TradableAccessToken
@objc public class TradableAccessToken: NSObject, NSCoding
Access token wrapper.
-
The token itself.
Declaration
Swift
@objc public let token: String -
The refresh token to use in order to refresh the API authentication. Will be nil for OAuth flow.
Declaration
Swift
@objc public let refreshToken: String? -
The endpoint URL from which the token was received.
Declaration
Swift
@objc public let endpointUrl: String -
The expiration date for this token.
Declaration
Swift
@objc public let expirationDate: Date -
The expiration date of the refresh token. Will be nil for OAuth flow.
Declaration
Swift
@objc public let refreshTokenExpirationDate: Date? -
Simple description of this object.
Declaration
Swift
public override var description: String -
Creates an object with given parameters.
Declaration
Swift
@objc public init(token: String, endpointUrl: String, expiresIn: UInt64) -
Creates an object with given parameters.
Declaration
Swift
@objc public init(token: String, endpointUrl: String, expirationDate: Date) -
Returns the list of accounts for which this token is used.
Declaration
Swift
@objc public func getAccounts() -> [TradableAccount] -
Removes the token from the keychain. If it’s an active token, nulls the SDK’s access token for the session.
Declaration
Swift
@objc public func dispose()
-
Creates an object with given parameters. Conforms to NSCoding protocol.
Declaration
Swift
required convenience public init?(coder decoder: NSCoder) -
Encoding method, conforming to NSCoding protocol.
Declaration
Swift
public func encode(with aCoder: NSCoder)
View on GitHub
TradableAccessToken Class Reference