Search in sources :

Example 1 with JaxbOAuth2AccessTokenMessageConverter

use of org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter 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 JaxbOAuth2AccessTokenMessageConverter

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

the class JaxbOAuth2AccessTokenMessageConverterTests method before.

@Before
public void before() throws Exception {
    converter = new JaxbOAuth2AccessTokenMessageConverter();
    accessToken = new DefaultOAuth2AccessToken("SlAV32hkKG");
    accessToken.setExpiration(expiration);
    accessToken.setRefreshToken(new DefaultOAuth2RefreshToken("8xLOxBtZp8"));
}
Also used : DefaultOAuth2RefreshToken(org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken) DefaultOAuth2AccessToken(org.springframework.security.oauth2.common.DefaultOAuth2AccessToken) Before(org.junit.Before)

Example 3 with JaxbOAuth2AccessTokenMessageConverter

use of org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter 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) ArrayList(java.util.ArrayList) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter)

Aggregations

JaxbOAuth2AccessTokenMessageConverter (org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2AccessTokenMessageConverter)2 JaxbOAuth2ExceptionMessageConverter (org.springframework.security.oauth2.http.converter.jaxb.JaxbOAuth2ExceptionMessageConverter)2 ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 HttpMessageConverter (org.springframework.http.converter.HttpMessageConverter)1 DefaultOAuth2AccessToken (org.springframework.security.oauth2.common.DefaultOAuth2AccessToken)1 DefaultOAuth2RefreshToken (org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken)1