diff --git a/NXOAuth2Account+Private.h b/NXOAuth2Account+Private.h index b512ff38..99c4f9bb 100644 --- a/NXOAuth2Account+Private.h +++ b/NXOAuth2Account+Private.h @@ -21,4 +21,6 @@ - (instancetype)initAccountWithAccessToken:(NXOAuth2AccessToken *)accessToken accountType:(NSString *)accountType; +@property (nonatomic, strong) NXOAuth2AccessToken *accessToken; + @end diff --git a/Sources/OAuth2Client/NXOAuth2Account.m b/Sources/OAuth2Client/NXOAuth2Account.m index fb23df9f..0e455087 100644 --- a/Sources/OAuth2Client/NXOAuth2Account.m +++ b/Sources/OAuth2Client/NXOAuth2Account.m @@ -33,6 +33,8 @@ #pragma mark - @interface NXOAuth2Account () + +@property (nonatomic, strong) NXOAuth2AccessToken *accessToken; @end #pragma mark - @@ -84,7 +86,7 @@ - (NXOAuth2Client *)oauthClient; @synchronized (oauthClient) { if (oauthClient == nil) { NSDictionary *configuration = [[NXOAuth2AccountStore sharedStore] configurationForAccountType:self.accountType]; - + NSString *clientID = [configuration objectForKey:kNXOAuth2AccountStoreConfigurationClientID]; NSString *clientSecret = [configuration objectForKey:kNXOAuth2AccountStoreConfigurationSecret]; NSURL *authorizeURL = [configuration objectForKey:kNXOAuth2AccountStoreConfigurationAuthorizeURL]; @@ -106,11 +108,11 @@ - (NXOAuth2Client *)oauthClient; if (additionalQueryParams) { oauthClient.additionalAuthenticationParameters = additionalQueryParams; } - + if (customHeaderFields) { oauthClient.customHeaderFields = customHeaderFields; } - + } } return oauthClient;