AuthStateProvider
class AuthStateProvider : IAuthStateProvider
Manages current authorization state which is used inside [AuthClient] object.
-
represents current authorization state
Declaration
Swift
private var authState: OIDAuthState? -
Sets auth state directly using the OIDAuthState object
Declaration
Swift
func setAuthState(_ state: OIDAuthState?)Parameters
stateAuthorization state to be set as current the value of the state can be nil, in this case the authorization state is reset
-
Sets auth state obtained from the OIDAuthorizationResponse and OIDTokenResponse
Declaration
Swift
func setAuthState(_ authResponse: OIDAuthorizationResponse, tokenResponse: OIDTokenResponse?)Parameters
stateAuth response used for auth state creation
tokenResponseToken response used for auth state creation
-
Returns token exchange request obtained from current auth state.
Declaration
Swift
func getTokenExchangeRequest() -> OIDTokenRequest?Return Value
OIDTokenRequest object on success or nil on failure.
-
Performs auth state update using the token response.
Declaration
Swift
func update(_ tokenResponse: OIDTokenResponse?, error: NSError?)Parameters
tokenResponseToken response to update current auth state.
errorError which could be occured when token response has been obtained.
-
Provides current auth state.
Declaration
Swift
func getAuthState() -> AnyObject?Return Value
auth state
-
Provides id token string obtained from current auth state or nil if there is no one id token stored.
Declaration
Swift
func getIdToken() -> String?Return Value
id token string
AuthStateProvider Class Reference