OAuthAuthorizeParams

@Serializable
data class OAuthAuthorizeParams(val clientId: String, val redirectUri: String, val state: String? = null, val scope: String? = null, val responseType: String = "code", val codeChallenge: String? = null, val codeChallengeMethod: String? = null)

OAuth 授权 URL 参数,用于生成 OAuth 授权 URL。

Parameters

clientId

应用 ID(格式 vap_xxxx),SDK 统一使用 clientId 命名,与 VDS 文档中的 appId 等价

redirectUri

授权后重定向 URI

state

可选的状态参数,用于防止 CSRF 攻击

scope

可选的权限范围

responseType

响应类型,默认为 "code"

codeChallenge

可选的 PKCE code_challenge

codeChallengeMethod

可选的 PKCE code_challenge_method,默认为 "SHA256"

Constructors

Link copied to clipboard
constructor(clientId: String, redirectUri: String, state: String? = null, scope: String? = null, responseType: String = "code", codeChallenge: String? = null, codeChallengeMethod: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
@SerialName(value = "code_challenge")
val codeChallenge: String?
Link copied to clipboard
@SerialName(value = "code_challenge_method")
val codeChallengeMethod: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard