org.springframework.security.oauth2.provider
Class JdbcClientDetailsService

java.lang.Object
  extended by org.springframework.security.oauth2.provider.JdbcClientDetailsService
All Implemented Interfaces:
ClientDetailsService, ClientRegistrationService

public class JdbcClientDetailsService
extends Object
implements ClientDetailsService, ClientRegistrationService

Basic, JDBC implementation of the client details service.


Constructor Summary
JdbcClientDetailsService(DataSource dataSource)
           
 
Method Summary
 void addClientDetails(ClientDetails clientDetails)
           
 List<ClientDetails> listClientDetails()
           
 ClientDetails loadClientByClientId(String clientId)
          Load a client by the client id.
 void removeClientDetails(String clientId)
           
 void setDeleteClientDetailsSql(String deleteClientDetailsSql)
           
 void setFindClientDetailsSql(String findClientDetailsSql)
           
 void setInsertClientDetailsSql(String insertClientDetailsSql)
           
 void setListFactory(JdbcListFactory listFactory)
           
 void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
           
 void setRowMapper(RowMapper<ClientDetails> rowMapper)
           
 void setSelectClientDetailsSql(String selectClientDetailsSql)
           
 void setUpdateClientDetailsSql(String updateClientDetailsSql)
           
 void setUpdateClientSecretSql(String updateClientSecretSql)
           
 void updateClientDetails(ClientDetails clientDetails)
           
 void updateClientSecret(String clientId, String secret)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcClientDetailsService

public JdbcClientDetailsService(DataSource dataSource)
Method Detail

setPasswordEncoder

public void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
Parameters:
passwordEncoder - the password encoder to set

loadClientByClientId

public ClientDetails loadClientByClientId(String clientId)
                                   throws InvalidClientException
Description copied from interface: ClientDetailsService
Load a client by the client id. This method must NOT return null.

Specified by:
loadClientByClientId in interface ClientDetailsService
Parameters:
clientId - The client id.
Returns:
The client details.
Throws:
InvalidClientException

addClientDetails

public void addClientDetails(ClientDetails clientDetails)
                      throws ClientAlreadyExistsException
Specified by:
addClientDetails in interface ClientRegistrationService
Throws:
ClientAlreadyExistsException

updateClientDetails

public void updateClientDetails(ClientDetails clientDetails)
                         throws NoSuchClientException
Specified by:
updateClientDetails in interface ClientRegistrationService
Throws:
NoSuchClientException

updateClientSecret

public void updateClientSecret(String clientId,
                               String secret)
                        throws NoSuchClientException
Specified by:
updateClientSecret in interface ClientRegistrationService
Throws:
NoSuchClientException

removeClientDetails

public void removeClientDetails(String clientId)
                         throws NoSuchClientException
Specified by:
removeClientDetails in interface ClientRegistrationService
Throws:
NoSuchClientException

listClientDetails

public List<ClientDetails> listClientDetails()
Specified by:
listClientDetails in interface ClientRegistrationService

setSelectClientDetailsSql

public void setSelectClientDetailsSql(String selectClientDetailsSql)

setDeleteClientDetailsSql

public void setDeleteClientDetailsSql(String deleteClientDetailsSql)

setUpdateClientDetailsSql

public void setUpdateClientDetailsSql(String updateClientDetailsSql)

setUpdateClientSecretSql

public void setUpdateClientSecretSql(String updateClientSecretSql)

setInsertClientDetailsSql

public void setInsertClientDetailsSql(String insertClientDetailsSql)

setFindClientDetailsSql

public void setFindClientDetailsSql(String findClientDetailsSql)

setListFactory

public void setListFactory(JdbcListFactory listFactory)
Parameters:
listFactory - the list factory to set

setRowMapper

public void setRowMapper(RowMapper<ClientDetails> rowMapper)
Parameters:
rowMapper - the rowMapper to set


Copyright © 2012. All Rights Reserved.