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


Java TokenStore类代码示例

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


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

示例1: clear

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
private void clear(TokenStore tokenStore) throws Exception {
	if (tokenStore instanceof Advised) {
		Advised advised = (Advised) tokenStore;
		TokenStore target = (TokenStore) advised.getTargetSource().getTarget();
		clear(target);
		return;
	}
	if (tokenStore instanceof InMemoryTokenStore) {
		((InMemoryTokenStore) tokenStore).clear();
	}
	if (tokenStore instanceof JdbcTokenStore) {
		JdbcTemplate template = new JdbcTemplate(dataSource);
		template.execute("delete from oauth_access_token");
		template.execute("delete from oauth_refresh_token");
		template.execute("delete from oauth_client_token");
		template.execute("delete from oauth_code");
	}
}
 
开发者ID:jfcorugedo,项目名称:spring-oauth2-samples,代码行数:19,代码来源:AbstractIntegrationTests.java

示例2: AuditOAuth2AccessDeniedHandler

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Autowired
public AuditOAuth2AccessDeniedHandler(
    TokenStore tokenStore,
    RequestAuditRecordDataService requestAuditRecordDataService,
    SecurityEventsLogService securityEventsLogService,
    UserContextFactory userContextFactory,
    WebResponseExceptionTranslator exceptionTranslator,
    AuditLogFactory auditLogFactory,
    MessageSourceAccessor messageSourceAccessor
) {
  this.userContextFactory = userContextFactory;
  this.tokenStore = tokenStore;
  this.requestAuditRecordDataService = requestAuditRecordDataService;
  this.securityEventsLogService = securityEventsLogService;
  this.exceptionTranslator = exceptionTranslator;
  this.auditLogFactory = auditLogFactory;
  this.messageSourceAccessor = messageSourceAccessor;
}
 
开发者ID:cloudfoundry-incubator,项目名称:credhub,代码行数:19,代码来源:AuditOAuth2AccessDeniedHandler.java

示例3: tokenStore

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@Qualifier("tokenStore")
public TokenStore tokenStore() {

    System.out.println("Created JwtTokenStore");
    return new JwtTokenStore(jwtAccessTokenConverter);
}
 
开发者ID:rhawan,项目名称:microservices-tcc-alfa,代码行数:8,代码来源:JwtConfiguration.java

示例4: jwkTokenServices

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(ResourceServerTokenServices.class)
public DefaultTokenServices jwkTokenServices(TokenStore jwkTokenStore) {
	DefaultTokenServices services = new DefaultTokenServices();
	services.setTokenStore(jwkTokenStore);
	return services;
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:8,代码来源:ResourceServerTokenServicesConfiguration.java

示例5: jwtTokenServices

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(ResourceServerTokenServices.class)
public DefaultTokenServices jwtTokenServices(TokenStore jwtTokenStore) {
	DefaultTokenServices services = new DefaultTokenServices();
	services.setTokenStore(jwtTokenStore);
	return services;
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:8,代码来源:ResourceServerTokenServicesConfiguration.java

示例6: OAuth2AuthorizationServerConfiguration

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public OAuth2AuthorizationServerConfiguration(BaseClientDetails details,
		AuthenticationConfiguration authenticationConfiguration,
		ObjectProvider<TokenStore> tokenStore,
		ObjectProvider<AccessTokenConverter> tokenConverter,
		AuthorizationServerProperties properties) throws Exception {
	this.details = details;
	this.authenticationManager = authenticationConfiguration.getAuthenticationManager();
	this.tokenStore = tokenStore.getIfAvailable();
	this.tokenConverter = tokenConverter.getIfAvailable();
	this.properties = properties;
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:12,代码来源:OAuth2AuthorizationServerConfiguration.java

示例7: tokenStore

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@Qualifier("tokenStore")
public TokenStore tokenStore() {

    System.out.println("Created JwtTokenStore");
    return new JwtTokenStore(jwtTokenEnhancer());
}
 
开发者ID:rhawan,项目名称:microservices-tcc-alfa,代码行数:8,代码来源:JwtConfiguration.java

示例8: OAuth2AuthorizationServerConfig

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public OAuth2AuthorizationServerConfig(AccessTokenConverter accessTokenConverter, ApprovalStore approvalStore, AuthenticationManager authenticationManager, OAuth2ClientService clientService, TokenEnhancer tokenEnhancer, TokenStore tokenStore) {
	this.accessTokenConverter = accessTokenConverter;
	this.approvalStore = approvalStore;
	this.authenticationManager = authenticationManager;
	this.clientService = clientService;
	this.tokenEnhancer = tokenEnhancer;
	this.tokenStore = tokenStore;
}
 
开发者ID:codenergic,项目名称:theskeleton,代码行数:9,代码来源:OAuth2AuthorizationServerConfig.java

示例9: JweTokenStore

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public JweTokenStore(String encodedSigningKey, TokenStore delegate,
                     JwtAccessTokenConverter converter, JweTokenSerializer crypto) {
    this.encodedSigningKey = encodedSigningKey;
    this.delegate = delegate;
    this.converter = converter;
    this.crypto = crypto;
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:8,代码来源:JweTokenStore.java

示例10: ResourceServerConfiguration

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public ResourceServerConfiguration(TokenStore tokenStore, Http401UnauthorizedEntryPoint http401UnauthorizedEntryPoint,
    AjaxLogoutSuccessHandler ajaxLogoutSuccessHandler, CorsFilter corsFilter) {

    this.tokenStore = tokenStore;
    this.http401UnauthorizedEntryPoint = http401UnauthorizedEntryPoint;
    this.ajaxLogoutSuccessHandler = ajaxLogoutSuccessHandler;
    this.corsFilter = corsFilter;
}
 
开发者ID:SGKhmCs,项目名称:speakTogether,代码行数:9,代码来源:OAuth2ServerConfiguration.java

示例11: AuthorizationServerConfiguration

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public AuthorizationServerConfiguration(@Qualifier("authenticationManagerBean") AuthenticationManager authenticationManager,
        TokenStore tokenStore, DataSource dataSource) {

    this.authenticationManager = authenticationManager;
    this.tokenStore = tokenStore;
    this.dataSource = dataSource;
}
 
开发者ID:SGKhmCs,项目名称:speakTogether,代码行数:8,代码来源:OAuth2ServerConfiguration.java

示例12: userApprovalHandler

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@Autowired
public TokenStoreUserApprovalHandler userApprovalHandler(TokenStore tokenStore) {
    TokenStoreUserApprovalHandler handler = new TokenStoreUserApprovalHandler();
    handler.setTokenStore(tokenStore);
    handler.setRequestFactory(new DefaultOAuth2RequestFactory(clientDetailsService));
    handler.setClientDetailsService(clientDetailsService);
    return handler;
}
 
开发者ID:andrsam,项目名称:urlshortener,代码行数:10,代码来源:SecurityConfig.java

示例13: approvalStore

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Bean
@Autowired
public ApprovalStore approvalStore(TokenStore tokenStore) throws Exception {
    TokenApprovalStore store = new TokenApprovalStore();
    store.setTokenStore(tokenStore);
    return store;
}
 
开发者ID:andrsam,项目名称:urlshortener,代码行数:8,代码来源:AuthorizationServerConfiguration.java

示例14: configure

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
	TokenStore tokenStore = new RedisTokenStore(redisConnectionFactory);
	// @formatter:off
       endpoints.tokenStore(tokenStore)
           .authenticationManager(authenticationManager)
           .userDetailsService(userDetailsService);
       // @formatter:on
}
 
开发者ID:sniperqpc,项目名称:Spring-cloud-gather,代码行数:10,代码来源:AuthorizationServerConfiguration.java

示例15: SeldonGrpcServer

import org.springframework.security.oauth2.provider.token.TokenStore; //导入依赖的package包/类
public SeldonGrpcServer(AppProperties appProperties,DeploymentStore deploymentStore,TokenStore tokenStore,ServerBuilder<?> serverBuilder,DeploymentsHandler deploymentsHandler, int port) 
{
    this.appProperties = appProperties;
    this.deploymentStore = deploymentStore;
    this.tokenStore = tokenStore;
    this.grpcDeploymentsListener = new grpcDeploymentsListener(this);
    this.deploymentsHandler = deploymentsHandler;
    deploymentsHandler.addListener(this.grpcDeploymentsListener);
    this.port = port;
    server = serverBuilder
          .addService(ServerInterceptors.intercept(new SeldonService(this), new HeaderServerInterceptor(this)))
      .build();
}
 
开发者ID:SeldonIO,项目名称:seldon-core,代码行数:14,代码来源:SeldonGrpcServer.java


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