Skip to content

Commit

Permalink
Supports AppAuth whether built as a module or not.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsika Phillip committed May 25, 2017
1 parent 780f6a9 commit 6dd4245
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
6 changes: 5 additions & 1 deletion Source/GTMTVAuthorizationRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

#import <Foundation/Foundation.h>

#import "OIDAuthorizationRequest.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#endif // GTMAPPAUTH_USER_IMPORTS

@class GTMTVServiceConfiguration;

Expand Down
7 changes: 6 additions & 1 deletion Source/GTMTVAuthorizationRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@

#import "GTMTVAuthorizationRequest.h"

#import "OIDScopeUtilities.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#import <AppAuth/OIDURLQueryComponent.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#import "OIDURLQueryComponent.h"
#endif // GTMAPPAUTH_USER_IMPORTS
#import "GTMTVServiceConfiguration.h"

@implementation GTMTVAuthorizationRequest
Expand Down
6 changes: 5 additions & 1 deletion Source/GTMTVAuthorizationResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@

#import <Foundation/Foundation.h>

#import "OIDAuthorizationResponse.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#endif // GTMAPPAUTH_USER_IMPORTS

@class GTMTVAuthorizationRequest;
@class OIDTokenRequest;
Expand Down
10 changes: 8 additions & 2 deletions Source/GTMTVAuthorizationResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
#import "GTMTVAuthorizationResponse.h"

#import "GTMTVAuthorizationRequest.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#import <AppAuth/OIDDefines.h>
#import <AppAuth/OIDFieldMapping.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#import "OIDDefines.h"
#import "OIDError.h"
#import "OIDFieldMapping.h"
#import "OIDTokenRequest.h"
#endif // GTMAPPAUTH_USER_IMPORTS


NSString *const GTMTVDeviceTokenGrantType = @"http://oauth.net/grant_type/device/1.0";

Expand Down
11 changes: 8 additions & 3 deletions Source/GTMTVAuthorizationService.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@

#import "GTMTVAuthorizationService.h"

#import "OIDAuthState.h"
#import "OIDAuthorizationService.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#import <AppAuth/OIDDefines.h>
#import <AppAuth/OIDURLQueryComponent.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#import "OIDDefines.h"
#import "OIDErrorUtilities.h"
#import "OIDURLQueryComponent.h"
#endif // GTMAPPAUTH_USER_IMPORTS

#import "GTMAppAuthFetcherAuthorization.h"
#import "GTMTVAuthorizationRequest.h"
#import "GTMTVAuthorizationResponse.h"
Expand Down
6 changes: 5 additions & 1 deletion Source/GTMTVServiceConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
limitations under the License.
*/

#import "OIDServiceConfiguration.h"
#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#endif // GTMAPPAUTH_USER_IMPORTS

NS_ASSUME_NONNULL_BEGIN

Expand Down
8 changes: 6 additions & 2 deletions Source/GTMTVServiceConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@

#import "GTMTVServiceConfiguration.h"

#ifndef GTMAPPAUTH_USER_IMPORTS
#import <AppAuth/AppAuth.h>
#import <AppAuth/OIDDefines.h>
#else // GTMAPPAUTH_USER_IMPORTS
#import "AppAuth.h"
#import "OIDDefines.h"
#import "OIDErrorUtilities.h"
#import "OIDServiceDiscovery.h"
#endif // GTMAPPAUTH_USER_IMPORTS

/*! @brief The key for the @c TVAuthorizationEndpoint property.
*/
Expand Down

0 comments on commit 6dd4245

Please sign in to comment.