small fix

This commit is contained in:
eugenp 2015-02-25 22:28:06 +02:00
parent c6d8560590
commit ec08b04f98
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ public class WebConfig extends WebMvcConfigurerAdapter {
@Bean
public OAuth2RestTemplate redditRestTemplate(OAuth2ClientContext clientContext) {
OAuth2RestTemplate template = new OAuth2RestTemplate(reddit(), clientContext);
AuthorizationCodeAccessTokenProvider authProvider = new AuthorizationCodeAccessTokenProvider();
AuthorizationCodeAccessTokenProvider authProvider = new MyAuthorizationCodeAccessTokenProvider();
authProvider.setAuthorizationRequestEnhancer(new CustomRequestEnhancer());
AccessTokenProvider accessTokenProvider = new AccessTokenProviderChain(Arrays.<AccessTokenProvider> asList(authProvider, new ImplicitAccessTokenProvider(), new ResourceOwnerPasswordAccessTokenProvider(), new ClientCredentialsAccessTokenProvider()));
template.setAccessTokenProvider(accessTokenProvider);