AuthenticationError
public struct AuthenticationError : Auth0APIError
extension AuthenticationError: Equatable
Represents an error during a request to the Auth0 Authentication API.
-
Additional information about the error.
Declaration
Swift
public let info: [String : Any]
-
Creates an error from a JSON response.
Declaration
Swift
public init(info: [String : Any], statusCode: Int)
Parameters
info
JSON response from Auth0.
statusCode
HTTP status code of the response.
Return Value
A new
AuthenticationError
. -
HTTP status code of the response.
Declaration
Swift
public let statusCode: Int
-
The underlying
Error
value, if any. Defaults tonil
.Declaration
Swift
public var cause: Error? { get }
-
The code of the error as a string.
Declaration
Swift
public var code: String { get }
-
Description of the error.
Important
You should avoid displaying the error description to the user, it’s meant for debugging only.Declaration
Swift
public var debugDescription: String { get }
-
When MFA is required to authenticate.
Declaration
Swift
public var isMultifactorRequired: Bool { get }
-
When MFA is required and the user is not enrolled.
Declaration
Swift
public var isMultifactorEnrollRequired: Bool { get }
-
When the MFA code sent is invalid or expired.
Declaration
Swift
public var isMultifactorCodeInvalid: Bool { get }
-
When the MFA token is invalid or expired.
Declaration
Swift
public var isMultifactorTokenInvalid: Bool { get }
-
When the password used for signup does not match the strength requirements of the connection. Additional information is available in the
info
dictionary.Declaration
Swift
public var isPasswordNotStrongEnough: Bool { get }
-
When the password used for signup was already used before. This is reported when the Password History feature is enabled. Additional information is available in the
info
dictionary.Declaration
Swift
public var isPasswordAlreadyUsed: Bool { get }
-
When an Auth0 rule returns an error. The message returned by the rule is available in
localizedDescription
.Declaration
Swift
public var isRuleError: Bool { get }
-
When the username and/or password used for authentication are invalid.
Declaration
Swift
public var isInvalidCredentials: Bool { get }
-
When performing web-based authentication, the resource server denies access per OAuth2 specifications.
Declaration
Swift
public var isAccessDenied: Bool { get }
-
When the user is blocked due to too many attempts to log in.
Declaration
Swift
public var isTooManyAttempts: Bool { get }
-
When an additional verification step is required.
Declaration
Swift
public var isVerificationRequired: Bool { get }
-
Conformance to
Equatable
.Declaration
Swift
public static func == (lhs: AuthenticationError, rhs: AuthenticationError) -> Bool