OAuth2Error
public enum OAuth2Error : String, Error
A failed authorization. Includes errors from both Implicit Grant (See RFC6749 4.2.2.1) and Extension Grants (See RFC6749 5.2), and a couple of SDK defined errors outside of OAuth2 specification.
-
The client is not authorized to request an access token using this method.
Declaration
Swift
case unauthorizedClient = "unauthorized_client"
-
The resource owner or authorization server denied the request.
Declaration
Swift
case accessDenied = "access_denied"
-
The authorization server does not support obtaining an access token using this method.
Declaration
Swift
case unsupportedResponseType = "unsupported_response_type"
-
The requested scope is invalid, unknown, or malformed.
Declaration
Swift
case invalidScope = "invalid_scope"
-
The authorization server encountered an unexpected condition that prevented it from fulfilling the request.
Declaration
Swift
case serverError = "server_error"
-
The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
Declaration
Swift
case temporarilyUnavailable = "temporarily_unavailable"
-
The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.
Declaration
Swift
case invalidRequest = "invalid_request"
-
Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).
Declaration
Swift
case invalidClient = "invalid_client"
-
The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
Declaration
Swift
case invalidGrant = "invalid_grant"
-
The authorization grant type is not supported by the authorization server.
Declaration
Swift
case unsupportedGrantType = "unsupported_grant_type"
-
The state param received from the authorization server does not match the state param stored by the SDK.
Declaration
Swift
case inconsistentState = "inconsistent_state"
-
Some other error (outside of the OAuth2 specification)
Declaration
Swift
case unknown
-
Indicates whether the error is invalid_grant error.
Declaration
Swift
public var isInvalidGrantError: Bool { get }