Java 类org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoRestTemplateCustomizer 实例源码

项目:spring-boot-oauth2-azuread    文件:WebSecurityConfig.java   
@Bean
public UserInfoRestTemplateCustomizer getUserInfoRestTemplateCustomizer() {
    return new UserInfoRestTemplateCustomizer() {
        @Override
        public void customize(OAuth2RestTemplate template) {
            template.setAccessTokenProvider(new MyAuthorizationCodeAccessTokenProvider());
        }
    };
}
项目:xxproject    文件:Application.java   
@Bean
public UserInfoRestTemplateCustomizer userInfoRestTemplateCustomizer(
        TraceRestTemplateInterceptor traceRestTemplateInterceptor) {
    return restTemplate -> {
        List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>(
                restTemplate.getInterceptors());
        interceptors.add(traceRestTemplateInterceptor);
        restTemplate.setInterceptors(interceptors);
    };
}
项目:xxproject    文件:Application.java   
@Bean
public UserInfoRestTemplateCustomizer userInfoRestTemplateCustomizer(
        TraceRestTemplateInterceptor traceRestTemplateInterceptor) {
    return restTemplate -> {
        List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>(
                restTemplate.getInterceptors());
        interceptors.add(traceRestTemplateInterceptor);
        restTemplate.setInterceptors(interceptors);
    };
}
项目:spring-cloud-security    文件:OAuth2LoadBalancerClientAutoConfiguration.java   
@Bean
public UserInfoRestTemplateCustomizer loadBalancedUserInfoRestTemplateCustomizer(
        final LoadBalancerInterceptor loadBalancerInterceptor) {
    return new UserInfoRestTemplateCustomizer() {
        @Override
        public void customize(OAuth2RestTemplate restTemplate) {
            List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>(
                    restTemplate.getInterceptors());
            interceptors.add(loadBalancerInterceptor);
            restTemplate.setInterceptors(interceptors);
        }
    };
}
项目:spring-cloud-security    文件:OAuth2LoadBalancerClientAutoConfiguration.java   
@Bean
public UserInfoRestTemplateCustomizer retryLoadBalancedUserInfoRestTemplateCustomizer(
                final RetryLoadBalancerInterceptor loadBalancerInterceptor) {
        return new UserInfoRestTemplateCustomizer() {
                @Override
                public void customize(OAuth2RestTemplate restTemplate) {
                        List<ClientHttpRequestInterceptor> interceptors = new ArrayList<>(
                                        restTemplate.getInterceptors());
                        interceptors.add(loadBalancerInterceptor);
                        restTemplate.setInterceptors(interceptors);
                }
        };
}