Search in sources :

Example 1 with JaxbOAuth2ExceptionMessageConverter

use of org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter in project spring-security-oauth by spring-projects.

the class Application method configureMessageConverters.

@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    converters.add(new JaxbOAuth2AccessTokenMessageConverter());
    converters.add(new JaxbOAuth2ExceptionMessageConverter());
}
Also used : JaxbOAuth2AccessTokenMessageConverter(org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter) JaxbOAuth2ExceptionMessageConverter(org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter)

Example 2 with JaxbOAuth2ExceptionMessageConverter

use of org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter in project spring-security-oauth by spring-projects.

the class DefaultOAuth2ExceptionRenderer method geDefaultMessageConverters.

private List<HttpMessageConverter<?>> geDefaultMessageConverters() {
    List<HttpMessageConverter<?>> result = new ArrayList<HttpMessageConverter<?>>();
    result.addAll(new RestTemplate().getMessageConverters());
    result.add(new JaxbOAuth2ExceptionMessageConverter());
    return result;
}
Also used : JaxbOAuth2ExceptionMessageConverter(org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) ArrayList(java.util.ArrayList) RestTemplate(org.springframework.web.client.RestTemplate)

Example 3 with JaxbOAuth2ExceptionMessageConverter

use of org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter in project spring-security-oauth by spring-projects.

the class Converters method getJaxbConverters.

public static Collection<HttpMessageConverter<?>> getJaxbConverters() {
    Collection<HttpMessageConverter<?>> converters = new ArrayList<>();
    converters.add(new JaxbOAuth2AccessTokenMessageConverter());
    converters.add(new JaxbOAuth2ExceptionMessageConverter());
    return converters;
}
Also used : JaxbOAuth2AccessTokenMessageConverter(org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter) JaxbOAuth2ExceptionMessageConverter(org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) ArrayList(java.util.ArrayList)

Aggregations

JaxbOAuth2ExceptionMessageConverter (org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter)3 ArrayList (java.util.ArrayList)2 HttpMessageConverter (org.springframework.http.converter.HttpMessageConverter)2 JaxbOAuth2AccessTokenMessageConverter (org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter)2 RestTemplate (org.springframework.web.client.RestTemplate)1