org.springframework.security.oauth2.provider.client.JdbcClientDetailsService Java Examples

The following examples show how to use org.springframework.security.oauth2.provider.client.JdbcClientDetailsService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractOAuth2ClientDetailsService.java    From onetwo with Apache License 2.0 5 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception {
	if(jdbcClientDetailsService==null){
		Assert.notNull(dataSource, "dataSource can not be null!");
		this.jdbcClientDetailsService = new JdbcClientDetailsService(dataSource);
		return ;
	}
	Assert.notNull(jdbcClientDetailsService, "jdbcClientDetailsService can not be null!");
}
 
Example #2
Source File: JdbcClientDetailsServiceConfig.java    From syhthems-platform with MIT License 5 votes vote down vote up
@Bean
@Primary
public ClientDetailsService jdbcClientDetailsService() {
    JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
    clientDetailsService.setPasswordEncoder(passwordEncoder);
    return clientDetailsService;
}
 
Example #3
Source File: AuthorizationServerConfig.java    From black-shop with Apache License 2.0 5 votes vote down vote up
/**
 * 设置client去数据库读取信息.
 *
 * @param clients the clients
 * @throws Exception the exception
 */
@Override
@SneakyThrows
public void configure(ClientDetailsServiceConfigurer clients) {
	JdbcClientDetailsService jdbcClientDetailsService = new JdbcClientDetailsService(dataSource);
	jdbcClientDetailsService.setSelectClientDetailsSql(SecurityConstants.DEFAULT_SELECT_STATEMENT);
	jdbcClientDetailsService.setFindClientDetailsSql(SecurityConstants.DEFAULT_FIND_STATEMENT);
	clients.withClientDetails(jdbcClientDetailsService);
}
 
Example #4
Source File: PigAuthorizationConfig.java    From pig with MIT License 5 votes vote down vote up
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
    JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource);
    clientDetailsService.setSelectClientDetailsSql(SecurityConstants.DEFAULT_SELECT_STATEMENT);
    clientDetailsService.setFindClientDetailsSql(SecurityConstants.DEFAULT_FIND_STATEMENT);
    clients.withClientDetails(clientDetailsService);
}
 
Example #5
Source File: AuthorizationServerConfig.java    From lion with Apache License 2.0 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetails() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #6
Source File: JdbcOAuth2SupportConfiguration.java    From omh-dsu-ri with Apache License 2.0 4 votes vote down vote up
/**
 * @return the service used to retrieve OAuth2 client details
 */
@Bean
public ClientDetailsService clientDetailsService() {

    return new JdbcClientDetailsService(dataSource);
}
 
Example #7
Source File: IndexController.java    From spring-oauth-example with MIT License 4 votes vote down vote up
public IndexController(JdbcClientDetailsService clientDetailsService, ApprovalStore approvalStore, TokenStore tokenStore) {
    this.clientDetailsService = clientDetailsService;
    this.approvalStore = approvalStore;
    this.tokenStore = tokenStore;
}
 
Example #8
Source File: ClientController.java    From spring-oauth-example with MIT License 4 votes vote down vote up
public ClientController(JdbcClientDetailsService clientDetailsService) {
    this.clientDetailsService = clientDetailsService;
}
 
Example #9
Source File: AbstractOAuth2ClientDetailsService.java    From onetwo with Apache License 2.0 4 votes vote down vote up
public JdbcClientDetailsService getJdbcClientDetailsService() {
	return jdbcClientDetailsService;
}
 
Example #10
Source File: AbstractOAuth2ClientDetailsService.java    From onetwo with Apache License 2.0 4 votes vote down vote up
public void setJdbcClientDetailsService(JdbcClientDetailsService jdbcClientDetailsService) {
	this.jdbcClientDetailsService = jdbcClientDetailsService;
}
 
Example #11
Source File: OAuth2Config.java    From microservice-integration with MIT License 4 votes vote down vote up
@Bean
public JdbcClientDetailsService jdbcClientDetailsService(DataSource dataSource) {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #12
Source File: AuthorizationSeverConfig.java    From springboot-vue.js-bbs with Apache License 2.0 4 votes vote down vote up
@Bean
@Primary
public ClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #13
Source File: OAuth2Config.java    From Auth-service with MIT License 4 votes vote down vote up
@Bean
public JdbcClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #14
Source File: WebSecurityConfiguration.java    From DAFramework with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService jdbcClientDetailsService() {
	return new JdbcClientDetailsService(dataSource);
}
 
Example #15
Source File: OAuth2Configuration.java    From OAuth-2.0-Cookbook with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #16
Source File: OAuth2AuthorizationServer.java    From OAuth-2.0-Cookbook with MIT License 4 votes vote down vote up
@Bean
public ClientRegistrationService clientRegistrationService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #17
Source File: OAuth2AuthorizationServer.java    From OAuth-2.0-Cookbook with MIT License 4 votes vote down vote up
@Bean
public ClientRegistrationService clientRegistrationService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #18
Source File: OauthAuthorizationServerConfig.java    From codeway_service with GNU General Public License v3.0 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetails() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #19
Source File: OAuth2SecurityConfiguration.java    From spring-cloud-shop with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetails() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #20
Source File: AuthorizationServerConfig.java    From java-tutorial with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetails() {
    JdbcClientDetailsService jdbcClientDetailsService = new JdbcClientDetailsService(dataSource);
    jdbcClientDetailsService.setPasswordEncoder(new BCryptPasswordEncoder());
    return jdbcClientDetailsService;
}
 
Example #21
Source File: OAuth2Configuration.java    From oauth2lab with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #22
Source File: AuthorizationServerConfig.java    From pacbot with Apache License 2.0 4 votes vote down vote up
@Bean
public JdbcClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #23
Source File: OauthAuthorizationServerConfig.java    From codeway_service with GNU General Public License v3.0 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetails() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #24
Source File: AuthorizationServerConfiguration.java    From cola with MIT License 4 votes vote down vote up
@Bean
public JdbcClientDetailsService jdbcClientDetailsService() {
	return new JdbcClientDetailsService(dataSource);
}
 
Example #25
Source File: AuthorizationServerConfiguration.java    From spring-boot-samples with Apache License 2.0 4 votes vote down vote up
@Bean
public ClientDetailsService jdbcClientDetails() {
    // 基于 JDBC 实现,需要事先在数据库配置客户端信息
    return new JdbcClientDetailsService(dataSource());
}
 
Example #26
Source File: ResourceServerConfiguration.java    From open-cloud with MIT License 4 votes vote down vote up
@Bean
public JdbcClientDetailsService clientDetailsService() {
    JdbcClientDetailsService jdbcClientDetailsService = new JdbcClientDetailsService(dataSource);
    jdbcClientDetailsService.setPasswordEncoder(passwordEncoder);
    return jdbcClientDetailsService;
}
 
Example #27
Source File: AuthorizationServerConfig.java    From cloud-template with MIT License 4 votes vote down vote up
@Bean
public ClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(dataSource());
}
 
Example #28
Source File: AuthorizationServerConfiguration.java    From MyShopPlus with Apache License 2.0 4 votes vote down vote up
@Bean
public ClientDetailsService jdbcClientDetailsService() {
    // 基于 JDBC 实现,需要事先在数据库配置客户端信息
    return new JdbcClientDetailsService(dataSource());
}
 
Example #29
Source File: Oauth2AuthorizationServerConfig.java    From spring-security-oauth2-demo with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 声明 ClientDetails实现
 *
 * @return ClientDetailsService
 */
@Bean
public ClientDetailsService clientDetails() {
    return new JdbcClientDetailsService(dataSource);
}
 
Example #30
Source File: OAuthConfiguration.java    From spring-oauth-example with MIT License 2 votes vote down vote up
/**
 * We expose the JdbcClientDetailsService because it has extra methods that the Interface does not have. E.g.
 * {@link org.springframework.security.oauth2.provider.client.JdbcClientDetailsService#listClientDetails()} which we need for the
 * admin page.
 */
@Bean
public JdbcClientDetailsService clientDetailsService() {
    return new JdbcClientDetailsService(oauthDataSource());
}