AppAuth
|
Delegate of the OIDAuthState used to monitor errors. More...
#import <OIDAuthStateErrorDelegate.h>
Instance Methods | |
(void) | - authState:didEncounterAuthorizationError: |
Called when an authentication occurs, which indicates the auth session is invalid. More... | |
(void) | - authState:didEncounterTransientError: |
Called when a network or other transient error occurs. More... | |
Delegate of the OIDAuthState used to monitor errors.
- (void) authState: | (OIDAuthState *) | state | |
didEncounterAuthorizationError: | (NSError *) | error | |
Called when an authentication occurs, which indicates the auth session is invalid.
state | The OIDAuthState on which the error occurred. |
error | The authorization error. @discussion This is a hard error (not a transient network issue) that indicates a problem with the authorization. You should stop using the OIDAuthState when such an error is encountered. If the NSError.code is OIDErrorCodeOAuthInvalidGrant then the session may be recoverable with user interaction (i.e. re-authentication). In all cases you should consider the user unauthorized, and remove locally cached resources that require that authorization. OIDAuthState will call this method automatically if it encounters an OAuth error (that is, an HTTP 400 response with a valid OAuth error response) during authorization or token refresh (such as performed automatically when using performActionWithFreshTokens: (OIDAuthState) ). You can signal authorization errors with updateWithAuthorizationError: (OIDAuthState) . |
|
optional |
Called when a network or other transient error occurs.
state | The OIDAuthState on which the error occurred. |
error | The transient error. @discussion This is a soft error, typically network related. The OIDAuthState is likely still valid, and should not be discarded. Retry the request using an incremental backoff strategy. This is only called when using the OIDAuthState convenience methods such as performActionWithFreshTokens: (OIDAuthState) . If you are refreshing the tokens yourself outside of OIDAuthState class, it will never be called. |