@@ -91,6 +91,7 @@ - (id)initWithClientID:(NSString *)aClientId
91
91
tokenType = [aTokenType copy ];
92
92
accessToken = anAccessToken;
93
93
94
+ self.tokenRequestHTTPMethod = @" POST" ;
94
95
self.acceptType = @" application/json" ;
95
96
96
97
self.persistent = shouldPersist;
@@ -308,7 +309,7 @@ - (void)requestTokenWithAuthGrant:(NSString *)authGrant redirectURL:(NSURL *)red
308
309
NSAssert1 (!authConnection, @" authConnection already running with: %@ " , authConnection);
309
310
310
311
NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL: tokenURL];
311
- [tokenRequest setHTTPMethod: @" POST " ];
312
+ [tokenRequest setHTTPMethod: self .tokenRequestHTTPMethod ];
312
313
[authConnection cancel ]; // just to be sure
313
314
314
315
self.authenticating = YES ;
@@ -341,7 +342,7 @@ - (void)authenticateWithClientCredentials;
341
342
NSAssert1 (!authConnection, @" authConnection already running with: %@ " , authConnection);
342
343
343
344
NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL: tokenURL];
344
- [tokenRequest setHTTPMethod: @" POST " ];
345
+ [tokenRequest setHTTPMethod: self .tokenRequestHTTPMethod ];
345
346
[authConnection cancel ]; // just to be sure
346
347
347
348
self.authenticating = YES ;
@@ -367,7 +368,7 @@ - (void)authenticateWithUsername:(NSString *)username password:(NSString *)passw
367
368
NSAssert1 (!authConnection, @" authConnection already running with: %@ " , authConnection);
368
369
369
370
NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL: tokenURL];
370
- [tokenRequest setHTTPMethod: @" POST " ];
371
+ [tokenRequest setHTTPMethod: self .tokenRequestHTTPMethod ];
371
372
[authConnection cancel ]; // just to be sure
372
373
373
374
self.authenticating = YES ;
@@ -402,7 +403,7 @@ - (void)authenticateWithAssertionType:(NSURL *)anAssertionType assertion:(NSStri
402
403
NSParameterAssert (anAssertion);
403
404
404
405
NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL: tokenURL];
405
- [tokenRequest setHTTPMethod: @" POST " ];
406
+ [tokenRequest setHTTPMethod: self .tokenRequestHTTPMethod ];
406
407
[authConnection cancel ]; // just to be sure
407
408
408
409
self.authenticating = YES ;
@@ -440,7 +441,7 @@ - (void)refreshAccessTokenAndRetryConnection:(NXOAuth2Connection *)retryConnecti
440
441
if (!authConnection) {
441
442
NSAssert ((accessToken.refreshToken != nil ), @"invalid state");
442
443
NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL: tokenURL];
443
- [tokenRequest setHTTPMethod: @" POST " ];
444
+ [tokenRequest setHTTPMethod: self .tokenRequestHTTPMethod ];
444
445
[authConnection cancel ]; // not needed, but looks more clean to me :)
445
446
446
447
NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys:
0 commit comments