當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。