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


Java JwkTokenStore类代码示例

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


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

示例1: jwkTokenStoreShouldBeConditionalOnMissingBean

import org.springframework.security.oauth2.provider.token.store.jwk.JwkTokenStore; //导入依赖的package包/类
@Test
public void jwkTokenStoreShouldBeConditionalOnMissingBean() throws Exception {
	TestPropertyValues
			.of("security.oauth2.resource.jwk.key-set-uri=http://my-auth-server/token_keys")
			.applyTo(this.environment);
	this.context = new SpringApplicationBuilder(JwkTokenStoreConfiguration.class,
			ResourceConfiguration.class).environment(this.environment)
					.web(WebApplicationType.NONE).run();
	assertThat(this.context.getBeansOfType(JwkTokenStore.class)).hasSize(1);
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:11,代码来源:ResourceServerTokenServicesConfigurationTests.java

示例2: jwkTokenStore

import org.springframework.security.oauth2.provider.token.store.jwk.JwkTokenStore; //导入依赖的package包/类
@Bean
public TokenStore jwkTokenStore() throws MalformedURLException {
    ProviderDiscoveryClient discoveryClient = new ProviderDiscoveryClient(ssoServiceUrl);
    ProviderConfiguration providerConfiguration = discoveryClient.discover();

    IssuerClaimVerifier issuerClaimVerifier = new IssuerClaimVerifier(providerConfiguration.getIssuer());

    return new JwkTokenStore(
        keySetUri,
        issuerClaimVerifier
    );
}
 
开发者ID:pivotal-cf,项目名称:spring-cloud-sso-connector,代码行数:13,代码来源:IssuerCheckConfiguration.java

示例3: jwkTokenStore

import org.springframework.security.oauth2.provider.token.store.jwk.JwkTokenStore; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(TokenStore.class)
public TokenStore jwkTokenStore() {
	return new JwkTokenStore(this.resource.getJwk().getKeySetUri());
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:6,代码来源:ResourceServerTokenServicesConfiguration.java

示例4: tokenStore

import org.springframework.security.oauth2.provider.token.store.jwk.JwkTokenStore; //导入依赖的package包/类
@Bean
public TokenStore tokenStore() {
	return new JwkTokenStore("http://my.key-set.uri");
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:5,代码来源:ResourceServerTokenServicesConfigurationTests.java

示例5: configure

import org.springframework.security.oauth2.provider.token.store.jwk.JwkTokenStore; //导入依赖的package包/类
@Override
public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
	resources.tokenStore(new JwkTokenStore("http://localhost:6432/oauth2/keys"));
}
 
开发者ID:vpavic,项目名称:simple-openid-provider,代码行数:5,代码来源:ResourceServerApplication.java


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