当前位置: 首页>>代码示例>>Java>>正文


Java AccessTokenProviderChain类代码示例

本文整理汇总了Java中org.springframework.security.oauth2.client.token.AccessTokenProviderChain的典型用法代码示例。如果您正苦于以下问题:Java AccessTokenProviderChain类的具体用法?Java AccessTokenProviderChain怎么用?Java AccessTokenProviderChain使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AccessTokenProviderChain类属于org.springframework.security.oauth2.client.token包,在下文中一共展示了AccessTokenProviderChain类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: restTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate restTemplate(OAuth2ClientContext context) {
    OAuth2RestTemplate rest = new OAuth2RestTemplate(resourceDetails(), context);
    AccessTokenProviderChain providerChain = new AccessTokenProviderChain(
            Arrays.asList(new AuthorizationCodeAccessTokenProvider()));
    rest.setAccessTokenProvider(providerChain);
    return rest;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:9,代码来源:GoogleConfiguration.java

示例2: FeignOAuthInterceptor

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
public FeignOAuthInterceptor(OAuth2ClientContext oAuth2ClientContext) {
	super(oAuth2ClientContext, null);
	this.oAuth2ClientContext = oAuth2ClientContext;
	this.accessTokenProvider = new AccessTokenProviderChain(Arrays.asList(new AuthorizationCodeAccessTokenProvider(),
			new ImplicitAccessTokenProvider(), new ResourceOwnerPasswordAccessTokenProvider(),
			new ClientCredentialsAccessTokenProvider()));
}
 
开发者ID:rhawan,项目名称:microservices-tcc-alfa,代码行数:8,代码来源:FeignOAuthInterceptor.java

示例3: restTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate restTemplate(OAuth2ClientContext context) {
    OAuth2RestTemplate rest = new OAuth2RestTemplate(resourceDetails(), context);
    rest.setAccessTokenProvider(
        new AccessTokenProviderChain(
            Arrays.asList(new AuthorizationCodeAccessTokenProvider())));
    return rest;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:9,代码来源:FacebookConfiguration.java

示例4: accessTokenProviderChain

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public AccessTokenProvider accessTokenProviderChain() {
    return new AccessTokenProviderChain(Arrays.<AccessTokenProvider> asList(
        new OpenIDTokenProvider(),
        new AuthorizationCodeAccessTokenProvider(), new ImplicitAccessTokenProvider(),
        new ResourceOwnerPasswordAccessTokenProvider(), new ClientCredentialsAccessTokenProvider()));
}
 
开发者ID:pivotal-cf,项目名称:identity-sample-apps,代码行数:8,代码来源:Application.java

示例5: oauth2RestTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate oauth2RestTemplate() {

    OAuth2ProtectedResourceDetails resourceDetails = authorizationCode();

    OAuth2RestTemplate template = new OAuth2RestTemplate(resourceDetails,
            oauth2ClientContext);

    AccessTokenProviderChain provider = new AccessTokenProviderChain(
            Arrays.asList(new AuthorizationCodeAccessTokenProvider()));

    provider.setClientTokenServices(clientTokenServices);
    template.setAccessTokenProvider(provider);

    return template;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:17,代码来源:ClientConfiguration.java

示例6: oauth2RestTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate oauth2RestTemplate() {

    OAuth2ProtectedResourceDetails resourceDetails = passwordResourceDetails();

    OAuth2RestTemplate template = new OAuth2RestTemplate(resourceDetails,
            oauth2ClientContext);

    AccessTokenProviderChain provider = new AccessTokenProviderChain(
            Arrays.asList(new ClientCredentialsAccessTokenProvider()));

    provider.setClientTokenServices(clientTokenServices);
    template.setAccessTokenProvider(provider);

    return template;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:17,代码来源:ClientConfiguration.java

示例7: oauth2RestTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate oauth2RestTemplate() {

    OAuth2ProtectedResourceDetails resourceDetails = passwordResourceDetails();

    OAuth2RestTemplate template = new OAuth2RestTemplate(resourceDetails,
            oauth2ClientContext);

    AccessTokenProviderChain provider = new AccessTokenProviderChain(
            Arrays.asList(new ResourceOwnerPasswordAccessTokenProvider()));

    provider.setClientTokenServices(clientTokenServices);
    template.setAccessTokenProvider(provider);

    return template;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:17,代码来源:ClientConfiguration.java

示例8: oauth2RestTemplate

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public OAuth2RestTemplate oauth2RestTemplate() {

    OAuth2ProtectedResourceDetails resourceDetails = implicitResourceDetails();

    OAuth2RestTemplate template = new OAuth2RestTemplate(resourceDetails,
            oauth2ClientContext);

    AccessTokenProviderChain provider = new AccessTokenProviderChain(
            Arrays.asList(new CustomImplicitAccessTokenProvider()));

    provider.setClientTokenServices(clientTokenServices);
    template.setAccessTokenProvider(provider);

    return template;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:17,代码来源:ClientConfiguration.java

示例9: accessTokenProviderChain

import org.springframework.security.oauth2.client.token.AccessTokenProviderChain; //导入依赖的package包/类
@Bean
public AccessTokenProvider accessTokenProviderChain() {
    return new AccessTokenProviderChain(Collections.singletonList(new CompositeAccessTokenProvider()));
}
 
开发者ID:pivotal-cf,项目名称:identity-sample-apps,代码行数:5,代码来源:Application.java


注:本文中的org.springframework.security.oauth2.client.token.AccessTokenProviderChain类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。