OAuthToken
public struct OAuthToken : Sendable, Equatable
An OAuth access token and its expiry, returned by the token delegate for the implicit OAuth flow.
Returned from the listener registered via setTokenDelegateListener(_:) so the SDK
can both use the token for the connection and track when it expires to request a fresh one in time.
-
The raw JWT / access token string obtained from the OAuth provider.
Declaration
Swift
public let accessToken: String -
The absolute time at which
accessTokenexpires.The SDK uses this value to request a fresh token shortly before the current one expires — the proactive refresh that keeps the implicit-flow session alive. The expiry is required so proactive refresh always functions; a token whose expiry is unknown would silently opt out of it.
Declaration
Swift
public let expiresAt: Date
-
Creates an OAuth token.
Declaration
Swift
public init(accessToken: String, expiresAt: Date)Parameters
accessTokenThe raw JWT / access token string.
expiresAtThe absolute expiry time of the token.
View on GitHub