Search in sources :

Example 1 with OAuth2AccessTokenSupport

use of org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport in project spring-security-oauth by spring-projects.

the class AbstractIntegrationTests method setupAccessTokenProvider.

@BeforeOAuth2Context
public void setupAccessTokenProvider() {
    AccessTokenProvider accessTokenProvider = createAccessTokenProvider();
    if (accessTokenProvider instanceof OAuth2AccessTokenSupport) {
        ((OAuth2AccessTokenSupport) accessTokenProvider).setRequestFactory(context.getRestTemplate().getRequestFactory());
        context.setAccessTokenProvider(accessTokenProvider);
    }
}
Also used : AccessTokenProvider(org.springframework.security.oauth2.client.token.AccessTokenProvider) OAuth2AccessTokenSupport(org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport) BeforeOAuth2Context(org.springframework.security.oauth2.client.test.BeforeOAuth2Context)

Aggregations

BeforeOAuth2Context (org.springframework.security.oauth2.client.test.BeforeOAuth2Context)1 AccessTokenProvider (org.springframework.security.oauth2.client.token.AccessTokenProvider)1 OAuth2AccessTokenSupport (org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport)1