gpt4 book ai didi

java - Spring oauth2 添加额外的 fieldp

转载 作者:行者123 更新时间:2023-12-01 09:38:38 25 4
gpt4 key购买 nike

登录后/uaa/oauth/token spring 发送该字段:

{
"access_token": "eyJhbG",
"token_type": "bearer",
"refresh_token": "asfasfda"
"expires_in": 86399,
"scope": "events",
"jti": "a4e4584c-ed38-4a26-b778-1748b27046ae",
"key" : "my own field"
}

但是我如何添加自己的自定义字段,例如键?

最佳答案

 @Configuration
@EnableResourceServer
protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter {

@Override
public void configure(ResourceServerSecurityConfigurer resources) {
resources.resourceId(Constants.RESOURCE_ID);
}

@Override
public void configure(HttpSecurity http) throws Exception {
http
.addFilter(new AuthTokenRequestFilter())
.....
}
}

关于java - Spring oauth2 添加额外的 fieldp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38622240/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com