Credentials
@objc(A0Credentials)
public final class Credentials : NSObject
extension Credentials: Codable
extension Credentials: NSSecureCoding
User’s credentials obtained from Auth0.
-
Token that can be used to make authenticated requests to the specified API (the audience value used on login).
See
Access TokensSee
AudienceDeclaration
Swift
public let accessToken: String
-
Type of the Access Token.
Declaration
Swift
public let tokenType: String
-
When the Access Token expires.
Declaration
Swift
public let expiresIn: Date
-
Token that can be used to request a new Access Token.
Requires
The scopeoffline_access
to have been requested on login.See
Refresh TokensDeclaration
Swift
public let refreshToken: String?
-
Token that contains the user information.
Important
The ID Tokens obtained from Web Auth login are automatically validated by Auth0.swift, ensuring their contents have not been tampered with. This is not the case for the ID Tokens obtained from the Authentication API client. You must validate any ID Tokens received from the Authentication API client before using the information they contain.See
ID TokensDeclaration
Swift
public let idToken: String
-
Granted scopes. This value is only present when one or more of the requested scopes were not granted.
See
ScopesDeclaration
Swift
public let scope: String?
-
MFA recovery code that the application must display to the user, to be stored securely for future use.
Declaration
Swift
public let recoveryCode: String?
-
Custom description that redacts the tokens with
<REDACTED>
.Declaration
Swift
public override var description: String { get }
-
Default initializer.
Declaration
Swift
public init(accessToken: String = "", tokenType: String = "", idToken: String = "", refreshToken: String? = nil, expiresIn: Date = Date(), scope: String? = nil, recoveryCode: String? = nil)
-
Decodable
initializer.Declaration
Swift
public convenience init(from decoder: Decoder) throws
-
NSSecureCoding
decoding initializer.Declaration
Swift
public convenience init?(coder aDecoder: NSCoder)
-
NSSecureCoding
encoding method.Declaration
Swift
public func encode(with aCoder: NSCoder)
-
Property that enables secure coding. Equals to
true
.Declaration
Swift
public static var supportsSecureCoding: Bool { get }