对应 Spring Security OAuth 的 TokenEndpoint 类的 postAccessToken 方法
授权码 authorization_code 模式时:code + redirectUri + state 参数 密码 password 模式时:username + password + scope 参数 刷新 refresh_token 模式时:refreshToken 参数 客户端 client_credentials 模式:scope 参数 简化 implicit 模式时:不支持
注意,默认需要传递 client_id + client_secret 参数 获得访问令牌 适合 code 授权码模式,或者 implicit 简化模式;在 sso.vue 单点登录界面被【获取】调用
curl --location --request POST '/system/oauth2/token?grant_type=code'
{
"code": 0,
"data": {
"access_token": "",
"refresh_token": "",
"token_type": "",
"expires_in": 0,
"scope": ""
},
"msg": ""
}