OAuthTokenData

@Serializable
data class OAuthTokenData(val accessToken: String, val expiresIn: Int, val tokenType: String, val scope: String? = null, val refreshToken: String? = null)

OAuth 令牌数据,包含 OAuth 访问令牌信息。

Parameters

accessToken

访问令牌(OAuth 流程专用)

expiresIn

有效期(秒)

tokenType

令牌类型

scope

授权的权限范围

refreshToken

刷新令牌,用于获取新的访问令牌

Constructors

Link copied to clipboard
constructor(accessToken: String, expiresIn: Int, tokenType: String, scope: String? = null, refreshToken: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "access_token")
val accessToken: String
Link copied to clipboard
@SerialName(value = "expires_in")
val expiresIn: Int
Link copied to clipboard
@SerialName(value = "refresh_token")
val refreshToken: String?
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "token_type")
val tokenType: String

Functions

Link copied to clipboard

将 OAuth 令牌数据转换为 TokenInfo。