From ef7718f24defb4fd7674bbd8a185a3df09115e12 Mon Sep 17 00:00:00 2001 From: Ryan Sonnek Date: Fri, 24 Apr 2015 12:15:21 -0500 Subject: [PATCH] cherry-pick d78dd61b90138207ffd962ae98d8fc54f471ba05 --- NXOAuth2Account+Private.h | 2 ++ Sources/OAuth2Client/NXOAuth2Account.m | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) 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;