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


Java JdbcApprovalStore类代码示例

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


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

示例1: configure

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
    endpoints.authenticationManager(authenticationManager)
        .userDetailsService(userDetailsService)
        .tokenEnhancer(new AppTokenEnhancer())
        // require tables oauth_access_token, oauth_client_token, oauth_code, oauth_refresh_token
        .tokenStore(new JdbcTokenStore(dataSource))
        .approvalStore(new JdbcApprovalStore(dataSource))
    ;
}
 
开发者ID:bndynet,项目名称:web-framework-for-java,代码行数:11,代码来源:OAuth2Config.java

示例2: clear

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

示例3: approvalStore

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
    return new JdbcApprovalStore(dataSource);
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:5,代码来源:OAuth2AuthorizationServer.java

示例4: approvalStore

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
	return new JdbcApprovalStore(dataSource);
}
 
开发者ID:JerryNiu,项目名称:cloud,代码行数:5,代码来源:AuthorizationServerConfig.java

示例5: approvalStore

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
ApprovalStore approvalStore() {
    DataSource dataSource = context.getBean(DataSource.class);
    return new JdbcApprovalStore(dataSource);
}
 
开发者ID:AgainstWind,项目名称:spring-cloud-demos,代码行数:6,代码来源:TestAuthorizationConfig.java

示例6: approvalStore

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean public ApprovalStore approvalStore() throws Exception {
	JdbcApprovalStore store = new JdbcApprovalStore(securityDataSource);
	return store;
}
 
开发者ID:ishaigor,项目名称:rest-retro-sample,代码行数:5,代码来源:OAuth2UserApprovalHandlerConfigurer.java

示例7: approvalStore

import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
    return new JdbcApprovalStore(oauthDataSource());
}
 
开发者ID:FrontierPsychiatrist,项目名称:spring-oauth-example,代码行数:5,代码来源:OAuthConfiguration.java


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