【发布时间】:2021-05-17 20:11:26
【问题描述】:
我目前正在开发一个使用 JDBCTokenStore 的项目。默认返回
{
"access_token": "<somedata>",
"token_type": "bearer",
"expires_in": <time>,
"scope": "read write"
}
有没有办法自定义这个响应? 我尝试使用 TokenEnhancer,但是这会将信息保存在数据库中,这不是我想要的。
我只想自定义响应并将其发送回最终用户(添加一个额外的参数,如用户状态,它会根据某些条件动态变化)。
{
"access_token": "<somedata>",
"token_type": "bearer",
"expires_in": <time>,
"scope": "read write"
"state": <true or false>
}
我们将不胜感激。
【问题讨论】:
标签: spring-boot spring-security-oauth2