0
Can anyone tell me if the Spring Security Oauth2 plugin supports access tokens in JSON format instead of XML format? And if yes what needs to be done to make that change?
0
Can anyone tell me if the Spring Security Oauth2 plugin supports access tokens in JSON format instead of XML format? And if yes what needs to be done to make that change?
1
Yes, it does. By default it already returns a JSON. In some newer versions of Spring Oauth2 it requires you to set a return pattern in Spring. Much depends on the Spring Framework and Spring Security Oauth2 version.
The default configuration I have now, using java, config is:
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.ignoreAcceptHeader(true)
.defaultContentType(MediaType.APPLICATION_JSON);
}
Browser other questions tagged json xml spring-security oauth2
You are not signed in. Login or sign up in order to post.