AccessToken

@objc
public class AccessToken : Token

AccessToken class represents access_token data inheriting from Token class

Property

  • Lifetime (expires_in) of access_token in seconds

    Declaration

    Swift

    @objc
    public var expiresIn: Int
  • token_type of access_token

    Declaration

    Swift

    @objc
    public var tokenType: String
  • Granted scope(s) with space separator for given access_token

    Declaration

    Swift

    @objc
    public var scope: String
  • refresh_token associated with access_token (optional)

    Declaration

    Swift

    @objc
    public var refreshToken: String?
  • id_token associated with access_token (optional)

    Declaration

    Swift

    @objc
    public var idToken: String?
  • Expiration Date of AccessToken

    Declaration

    Swift

    @objc
    public var expiration: Date { get }
  • Boolean indicator whether access_token is expired or not with given expiration and authentication timestamp

    Declaration

    Swift

    @objc
    public var isExpired: Bool { get }

Method

  • Builds Authorization header with given access_token and token_type

    Declaration

    Swift

    @objc
    public func buildAuthorizationHeader() -> String

    Return Value

    String value of “:

Debug

  • Prints debug description of AccessToken

    Declaration

    Swift

    override public var debugDescription: String { get }

NSSecureCoding

  • Boolean value of whether SecureCoding is supported or not

    Declaration

    Swift

    override public class var supportsSecureCoding: Bool { get }
  • Initializes AccessToken object with NSCoder

    Declaration

    Swift

    required public convenience init?(coder aDecoder: NSCoder)

    Parameters

    aDecoder

    NSCoder

  • Encodes AccessToken object with NSCoder

    Declaration

    Swift

    override public func encode(with aCoder: NSCoder)

    Parameters

    aCoder

    NSCoder

  • Declaration

    Swift

    public override func encode(to encoder: Encoder) throws
  • Evaluates whether given object is equal to the self-object or not

    Declaration

    Swift

    override public func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    An object to be compared

    Return Value

    Boolean result of whether given AccessToken is equal or not