AppAuth
Instance Methods | List of all members
<OIDAuthStateErrorDelegate> Protocol Reference

Delegate of the OIDAuthState used to monitor errors. More...

#import <OIDAuthStateErrorDelegate.h>

Inheritance diagram for <OIDAuthStateErrorDelegate>:

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...
 

Detailed Description

Delegate of the OIDAuthState used to monitor errors.

Method Documentation

◆ authState:didEncounterAuthorizationError:()

- (void) authState: (OIDAuthState *)  state
didEncounterAuthorizationError: (NSError *)  error 

Called when an authentication occurs, which indicates the auth session is invalid.

Parameters
stateThe OIDAuthState on which the error occurred.
errorThe 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).
See also
https://tools.ietf.org/html/rfc6749#section-5.2

◆ authState:didEncounterTransientError:()

- (void) authState: (OIDAuthState *)  state
didEncounterTransientError: (NSError *)  error 
optional

Called when a network or other transient error occurs.

Parameters
stateThe OIDAuthState on which the error occurred.
errorThe 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.

The documentation for this protocol was generated from the following file: