本文整理匯總了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"));
}