According to JSON Vulnerability Protection I prefix JSON responses:
@Bean public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); converter.setJsonPrefix(")]}',\n"); return converter; }
It works fine with AngularJS, but not with @EnableOAuth2Resource
-App, because Jackson can't parse response from Authorization Server. Firthermore, I can't override
@Bean public TokenStore jwtTokenStore() { return new JwtTokenStore(jwtTokenEnhancer()); }
definition from org.springframework.cloud.security.oauth2.resource.ResourceServerTokenServicesConfiguration.JwtTokenServicesConfiguration
to configure ObjectMapper/RestTemplate because of autoconfiguration ordering and SPR-13980.
Maybe I'm missing a solution?
0 comments:
Post a Comment