Spring oauth2添加了额外的fieldp

时间:2016-07-27 20:05:43

标签: java spring spring-security spring-security-oauth2

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

var db3 = new IMS();

db3.TabModuleSettings.Find(973, "ShowSoldOut"); //Local.Count=1
db3.TabModuleSettings.Local.Clear(); //Local.Count=0

db3.TabModuleSettings.Find( 142, "AllowIndex" ); //Local.Count=1
db3.TabModuleSettings.Local.Clear(); //Local.Count=0

db3.TabModuleSettings.Find(973, "ShowSoldOut"); //Local.Count=0
db3.TabModuleSettings.Local.Clear(); //Local.Count=0

db3.TabModuleSettings.Find( 142, "AllowIndex" ); //Local.Count=0

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

1 个答案:

答案 0 :(得分:1)

 @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())
           .....
        }
}