本文整理汇总了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
);
}
示例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"));
}