TokenInfo

public class TokenInfo : Codable
extension TokenInfo: Equatable

Info about the tokens used by the SDK for authentication.

Properties

  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Initializer

    Declaration

    Swift

    public init(accessToken: String, refreshToken: String?, expiresIn: TimeInterval, tokenType: String)

    Parameters

    accessToken

    Access token.

    refreshToken

    Refresh token.

    expiresIn

    Expiration date of the token.

    tokenType

    Type of the token.

  • Initializer.

    Declaration

    Swift

    public init(accessToken: String, expiresIn: TimeInterval)

    Parameters

    accessToken

    Access token.

    expiresIn

    Expiration date of the token.

  • Compares tokens

    Declaration

    Swift

    public static func == (lhs: TokenInfo, rhs: TokenInfo) -> Bool

    Parameters

    lhs

    First token

    rhs

    Second tken

    Return Value

    True in case tokens are the same, false otherwise.