18 #import <Foundation/Foundation.h> 26 @protocol OIDAuthorizationFlowSession;
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;
129 + (id<OIDAuthorizationFlowSession>)
137 - (instancetype)init NS_UNAVAILABLE;
161 - (instancetype)initWithAuthorizationResponse:
165 NS_DESIGNATED_INITIALIZER;
176 error:(nullable NSError *)error;
187 error:(nullable NSError *)error;
209 - (void)updateWithAuthorizationError:(NSError *)authorizationError;
226 additionalRefreshParameters:
227 (nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
251 - (nullable
OIDTokenRequest *)tokenRefreshRequestWithAdditionalParameters:
252 (nullable NSDictionary<NSString *, NSString *> *)additionalParameters;
262 __deprecated_msg("Use
OIDAuthState.performActionWithFreshTokens:");
266 NS_ASSUME_NONNULL_END
OIDTokenResponse * lastTokenResponse
The most recent token response used to update this authorization state. This will contain the latest ...
Definition: OIDAuthState.h:79
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 various changes in state.
Definition: OIDAuthStateChangeDelegate.h:21
NS_ASSUME_NONNULL_BEGIN typedef void(^ OIDAuthStateAction)(NSString *_Nullable accessToken, NSString *_Nullable idToken, NSError *_Nullable error)
Represents a block used to call an action with a fresh access token.
NSString * refreshToken
The most recent refresh token received from the server. Rather than using this property directly...
Definition: OIDAuthState.h:62
NSString * scope
The scope of the current authorization grant. This represents the latest scope returned by the serve...
Definition: OIDAuthState.h:69
void setNeedsTokenRefresh()
Forces a token refresh the next time performActionWithFreshTokens: is called, even if the current tok...
An authorization UI coordinator that presents an authorization request. Clients may provide custom im...
Definition: OIDAuthorizationUICoordinator.h:30
Represents the response to an authorization request.
Definition: OIDAuthorizationResponse.h:31
Represents an authorization request.
Definition: OIDAuthorizationRequest.h:40
BOOL isAuthorized
Returns YES if the authorization state is not known to be invalid. Returns YES if no OAuth errors ha...
Definition: OIDAuthState.h:105
Represents a registration response.
Definition: OIDRegistrationResponse.h:53
Represents a token request.
Definition: OIDTokenRequest.h:34
OIDRegistrationResponse * lastRegistrationResponse
The most recent registration response used to update this authorization state. This will contain the ...
Definition: OIDAuthState.h:84
id< OIDAuthStateErrorDelegate > errorDelegate
The OIDAuthStateErrorDelegate delegate. Use the delegate to observe state changes (and update storag...
Definition: OIDAuthState.h:117
NSError * authorizationError
The authorization error that invalidated this OIDAuthState. The authorization error encountered by O...
Definition: OIDAuthState.h:94
Represents the response to an token request.
Definition: OIDTokenResponse.h:29
id< OIDAuthStateChangeDelegate > stateChangeDelegate
The OIDAuthStateChangeDelegate delegate. Use the delegate to observe state changes (and update stora...
Definition: OIDAuthState.h:111
A convenience class that retains the auth state between OIDAuthorizationResponses and OIDTokenRespons...
Definition: OIDAuthState.h:54
void(^ OIDAuthStateAuthorizationCallback)(OIDAuthState *_Nullable authState, NSError *_Nullable error)
The method called when the authStateByPresentingAuthorizationRequest:presentingViewController:callbac...
Definition: OIDAuthState.h:48
Delegate of the OIDAuthState used to monitor errors.
Definition: OIDAuthStateErrorDelegate.h:21
nullable OIDTokenRequest * tokenRefreshRequest()
Creates a token request suitable for refreshing an access token.