Skip to content

Commit 16a6efa

Browse files
author
hakonk
committed
fix: trailing white spaces
1 parent 7f04c8b commit 16a6efa

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

ios/RNAppAuth.m

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ - (dispatch_queue_t)methodQueue
3535
additionalParameters: additionalParameters
3636
resolve: resolve
3737
reject: reject];
38-
3938
} else {
4039
[OIDAuthorizationService discoverServiceConfigurationForIssuer:[NSURL URLWithString:issuer]
4140
completion:^(OIDServiceConfiguration *_Nullable configuration, NSError *_Nullable error) {
4241
if (!configuration) {
4342
reject(@"RNAppAuth Error", [error localizedDescription], error);
4443
return;
4544
}
46-
4745
[self authorizeWithConfiguration: configuration
4846
redirectUrl: redirectUrl
4947
clientId: clientId
@@ -80,7 +78,6 @@ - (dispatch_queue_t)methodQueue
8078
additionalParameters: additionalParameters
8179
resolve: resolve
8280
reject: reject];
83-
8481
} else {
8582
// otherwise hit up the discovery endpoint
8683
[OIDAuthorizationService discoverServiceConfigurationForIssuer:[NSURL URLWithString:issuer]
@@ -110,13 +107,13 @@ - (OIDServiceConfiguration *) createServiceConfiguration: (NSDictionary *) servi
110107
NSURL *authorizationEndpoint = [NSURL URLWithString: [serviceConfiguration objectForKey:@"authorizationEndpoint"]];
111108
NSURL *tokenEndpoint = [NSURL URLWithString: [serviceConfiguration objectForKey:@"tokenEndpoint"]];
112109
NSURL *registrationEndpoint = [NSURL URLWithString: [serviceConfiguration objectForKey:@"registrationEndpoint"]];
113-
110+
114111
OIDServiceConfiguration *configuration =
115112
[[OIDServiceConfiguration alloc]
116113
initWithAuthorizationEndpoint:authorizationEndpoint
117114
tokenEndpoint:tokenEndpoint
118115
registrationEndpoint:registrationEndpoint];
119-
116+
120117
return configuration;
121118
}
122119

@@ -141,10 +138,10 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
141138
redirectURL:[NSURL URLWithString:redirectUrl]
142139
responseType:OIDResponseTypeCode
143140
additionalParameters:additionalParameters];
144-
141+
145142
// performs authentication request
146143
id<UIApplicationDelegate, RNAppAuthAuthorizationFlowManager> appDelegate = (id<UIApplicationDelegate, RNAppAuthAuthorizationFlowManager>)[UIApplication sharedApplication].delegate;
147-
144+
148145
id<OIDAuthorizationFlowSession> currentSession =
149146
[OIDAuthState authStateByPresentingAuthorizationRequest:request
150147
presentingViewController:appDelegate.window.rootViewController
@@ -155,7 +152,7 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
155152
} else {
156153
reject(@"RNAppAuth Error", [error localizedDescription], error);
157154
}
158-
155+
159156
}]; // end [OIDAuthState authStateByPresentingAuthorizationRequest:request
160157
if ([[appDelegate class] conformsToProtocol:@protocol(RNAppAuthAuthorizationFlowManager)]
161158
&& [appDelegate respondsToSelector: @selector(setCurrentAuthorizationFlowSession:)]) {
@@ -179,7 +176,7 @@ - (void)refreshWithConfiguration: (OIDServiceConfiguration *)configuration
179176
additionalParameters: (NSDictionary *_Nullable) additionalParameters
180177
resolve:(RCTPromiseResolveBlock) resolve
181178
reject: (RCTPromiseRejectBlock) reject {
182-
179+
183180
OIDTokenRequest *tokenRefreshRequest =
184181
[[OIDTokenRequest alloc] initWithConfiguration:configuration
185182
grantType:@"refresh_token"
@@ -191,7 +188,7 @@ - (void)refreshWithConfiguration: (OIDServiceConfiguration *)configuration
191188
refreshToken:refreshToken
192189
codeVerifier:nil
193190
additionalParameters:additionalParameters];
194-
191+
195192
[OIDAuthorizationService performTokenRequest:tokenRefreshRequest
196193
callback:^(OIDTokenResponse *_Nullable response,
197194
NSError *_Nullable error) {
@@ -201,7 +198,6 @@ - (void)refreshWithConfiguration: (OIDServiceConfiguration *)configuration
201198
reject(@"RNAppAuth Error", [error localizedDescription], error);
202199
}
203200
}];
204-
205201
}
206202

207203
/*
@@ -212,7 +208,7 @@ - (NSDictionary*)formatResponse: (OIDTokenResponse*) response {
212208
dateFormat.timeZone = [NSTimeZone timeZoneWithAbbreviation: @"UTC"];
213209
[dateFormat setLocale:[NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]];
214210
[dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss'Z'"];
215-
211+
216212
return @{@"accessToken": response.accessToken ? response.accessToken : @"",
217213
@"accessTokenExpirationDate": response.accessTokenExpirationDate ? [dateFormat stringFromDate:response.accessTokenExpirationDate] : @"",
218214
@"additionalParameters": response.additionalParameters,

0 commit comments

Comments
 (0)