TokenInfo

@Serializable
data class TokenInfo(val accessToken: String, val apiKey: String, val expiresAt: Long, val tokenType: String, val refreshToken: String? = null)

令牌信息,SDK 内部使用的令牌存储结构,统一管理签名交换和 OAuth 两种认证方式的令牌。

Parameters

accessToken

访问令牌,用于 Authorization: Bearer 认证头

apiKey

API 密钥,用于 X-Api-Key 认证头

expiresAt

过期时间戳(毫秒)

tokenType

令牌类型

refreshToken

可选的刷新令牌,用于 OAuth 令牌刷新

Constructors

Link copied to clipboard
constructor(accessToken: String, apiKey: String, expiresAt: Long, tokenType: String, refreshToken: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

检查是否需要刷新令牌。