File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ extern NSString * const kNXOAuth2AccountStoreConfigurationRedirectURL;
35
35
extern NSString * const kNXOAuth2AccountStoreConfigurationScope ;
36
36
extern NSString * const kNXOAuth2AccountStoreConfigurationTokenType ;
37
37
extern NSString * const kNXOAuth2AccountStoreConfigurationTokenRequestHTTPMethod ;
38
- extern NSString * const kNXOAuth2AccountStoreConfigurationCustomHeaderFields ;
39
38
40
39
/*
41
40
* Requires a NSDictionary as a value.
@@ -45,6 +44,13 @@ extern NSString * const kNXOAuth2AccountStoreConfigurationCustomHeaderFields;
45
44
*/
46
45
extern NSString * const kNXOAuth2AccountStoreConfigurationAdditionalAuthenticationParameters ;
47
46
47
+ /*
48
+ * Requires a NSDictionary as a value.
49
+ * They are passed onto the HTTP Header Fields request as additional parameters.
50
+ * Example of a valid setup: @{ @"Content-type" : @"application/x-www-form-urlencoded" }
51
+ */
52
+ extern NSString * const kNXOAuth2AccountStoreConfigurationCustomHeaderFields ;
53
+
48
54
49
55
#pragma mark Account Type
50
56
Original file line number Diff line number Diff line change @@ -407,7 +407,9 @@ - (void)authenticateWithUsername:(NSString *)username password:(NSString *)passw
407
407
}
408
408
409
409
if (self.customHeaderFields ) {
410
- [tokenRequest setAllHTTPHeaderFields: self .customHeaderFields];
410
+ [self .customHeaderFields enumerateKeysAndObjectsUsingBlock: ^(NSString *key, NSString *obj, BOOL *stop) {
411
+ [tokenRequest addValue: obj forHTTPHeaderField: key];
412
+ }];
411
413
}
412
414
413
415
authConnection = [[NXOAuth2Connection alloc ] initWithRequest: tokenRequest
You can’t perform that action at this time.
0 commit comments