cloudroam
2025-03-31 a7820e2f1ee06a7b43b4d351cced3343d7e1a5e2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import com.google.gson.annotations.SerializedName
 
data class OAuth2AccessToken(
    @SerializedName("access_token")
    val value: String,          // token值
    @SerializedName("token_type")
    val tokenType: String,      // token类型
    @SerializedName("refresh_token")
    val refreshToken: String,   // 刷新token
    val scope: String          // 作用域
)
 
data class TokenResponse(
    val code: String,          // 注意这里改为 String 类型
    val msg: String,
    val data: OAuth2AccessToken?
)