本文整理汇总了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))
;
}
示例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");
}
}
示例3: approvalStore
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
return new JdbcApprovalStore(dataSource);
}
示例4: approvalStore
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
return new JdbcApprovalStore(dataSource);
}
示例5: approvalStore
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
ApprovalStore approvalStore() {
DataSource dataSource = context.getBean(DataSource.class);
return new JdbcApprovalStore(dataSource);
}
示例6: approvalStore
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean public ApprovalStore approvalStore() throws Exception {
JdbcApprovalStore store = new JdbcApprovalStore(securityDataSource);
return store;
}
示例7: approvalStore
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore; //导入依赖的package包/类
@Bean
public ApprovalStore approvalStore() {
return new JdbcApprovalStore(oauthDataSource());
}