Skip to content

Commit a3e911e

Browse files
committedApr 25, 2013
Moved the clearAuthorizationHeader call
This allows authorization to be set, and used, outside the call to `authenticateUsingOAuthWithPath...`
1 parent 3557481 commit a3e911e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎AFOAuth2Client/AFOAuth2Client.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ - (void)authenticateUsingOAuthWithPath:(NSString *)path
168168
[mutableParameters setValue:self.secret forKey:@"client_secret"];
169169
parameters = [NSDictionary dictionaryWithDictionary:mutableParameters];
170170

171-
[self clearAuthorizationHeader];
172-
173171
NSMutableURLRequest *mutableRequest = [self requestWithMethod:@"POST" path:path parameters:parameters];
174172
[mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Accept"];
175173

@@ -199,6 +197,7 @@ - (void)authenticateUsingOAuthWithPath:(NSString *)path
199197

200198
[credential setRefreshToken:refreshToken expiration:expireDate];
201199

200+
[self clearAuthorizationHeader];
202201
[self setAuthorizationHeaderWithCredential:credential];
203202

204203
if (success) {

0 commit comments

Comments
 (0)
Please sign in to comment.