Go to the documentation of this file.
18 #import <Foundation/Foundation.h>
31 NS_ASSUME_NONNULL_BEGIN
39 NSString *_Nullable idToken,
40 NSError *_Nullable error);
49 NSError *_Nullable error);
69 @property(nonatomic, readonly, nullable) NSString *
scope;
117 @property(nonatomic, weak, nullable) id<OIDAuthStateErrorDelegate>
errorDelegate;
140 - (instancetype)init NS_UNAVAILABLE;
164 - (instancetype)initWithAuthorizationResponse:
168 NS_DESIGNATED_INITIALIZER;
179 error:(nullable NSError *)error;
190 error:(nullable NSError *)error;
212 - (void)updateWithAuthorizationError:(NSError *)authorizationError;
229 additionalRefreshParameters:
230 (nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
241 additionalRefreshParameters:
242 (nullable NSDictionary<NSString *, NSString *> *)additionalParameters
243 dispatchQueue:(dispatch_queue_t)dispatchQueue;
267 - (nullable
OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters:
268 (nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
272 NS_ASSUME_NONNULL_END
OIDAuthorizationResponse * lastAuthorizationResponse
The most recent authorization response used to update the authorization state. For the implicit flow,...
Definition: OIDAuthState.h:74
Delegate of the OIDAuthState used to monitor errors.
Definition: OIDAuthStateErrorDelegate.h:28
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
nullable OIDTokenRequest * tokenRefreshRequest()
Creates a token request suitable for refreshing an access token.
Delegate of the OIDAuthState used to monitor various changes in state.
Definition: OIDAuthStateChangeDelegate.h:28
Represents an authorization request.
Definition: OIDAuthorizationRequest.h:41
NSString * refreshToken
The most recent refresh token received from the server. @discussion Rather than using this property d...
Definition: OIDAuthState.h:62
void(^ OIDAuthStateAuthorizationCallback)(OIDAuthState *_Nullable authState, NSError *_Nullable error)
The method called when the authStateByPresentingAuthorizationRequest:presentingViewController:callbac...
Definition: OIDAuthState.h:48
BOOL isAuthorized
Returns YES if the authorization state is not known to be invalid. @discussion Returns YES if no OAut...
Definition: OIDAuthState.h:105
NSError * authorizationError
The authorization error that invalidated this OIDAuthState. @discussion The authorization error encou...
Definition: OIDAuthState.h:94
Represents a registration response.
Definition: OIDRegistrationResponse.h:53
NSString * scope
The scope of the current authorization grant. @discussion This represents the latest scope returned b...
Definition: OIDAuthState.h:69
Represents an in-flight external user-agent session.
Definition: OIDExternalUserAgentSession.h:23
Represents a token request.
Definition: OIDTokenRequest.h:34
A convenience class that retains the auth state between OIDAuthorizationResponses and OIDTokenRespons...
Definition: OIDAuthState.h:54
OIDRegistrationResponse * lastRegistrationResponse
The most recent registration response used to update this authorization state. This will contain the ...
Definition: OIDAuthState.h:84
OIDTokenResponse * lastTokenResponse
The most recent token response used to update this authorization state. This will contain the latest ...
Definition: OIDAuthState.h:79
void setNeedsTokenRefresh()
Forces a token refresh the next time performActionWithFreshTokens: is called, even if the current tok...
void(^ OIDAuthStateAction)(NSString *_Nullable accessToken, NSString *_Nullable idToken, NSError *_Nullable error)
Represents a block used to call an action with a fresh access token.
Definition: OIDAuthState.h:38
Represents the response to an token request.
Definition: OIDTokenResponse.h:29
id< OIDAuthStateErrorDelegate > errorDelegate
The OIDAuthStateErrorDelegate delegate. @discussion Use the delegate to observe state changes (and up...
Definition: OIDAuthState.h:117
An external user-agent UI that presents displays the request to the user. Clients may provide custom ...
Definition: OIDExternalUserAgent.h:31
id< OIDAuthStateChangeDelegate > stateChangeDelegate
The OIDAuthStateChangeDelegate delegate. @discussion Use the delegate to observe state changes (and u...
Definition: OIDAuthState.h:111