@Service public class DefaultOAuth2ClientDetailsEntityService extends Object implements ClientDetailsEntityService
Constructor and Description |
---|
DefaultOAuth2ClientDetailsEntityService() |
Modifier and Type | Method and Description |
---|---|
void |
deleteClient(ClientDetailsEntity client)
Delete a client and all its associated tokens
|
ClientDetailsEntity |
generateClientId(ClientDetailsEntity client)
Generates a clientId for the given client and sets it to the client's clientId field.
|
ClientDetailsEntity |
generateClientSecret(ClientDetailsEntity client)
Generates a new clientSecret for the given client and sets it to the client's clientSecret field.
|
Collection<ClientDetailsEntity> |
getAllClients()
Get all clients in the system
|
ClientDetailsEntity |
getClientById(Long id)
Get the client by its internal ID
|
ClientDetailsEntity |
loadClientByClientId(String clientId)
Get the client for the given ClientID
|
ClientDetailsEntity |
saveNewClient(ClientDetailsEntity client) |
ClientDetailsEntity |
updateClient(ClientDetailsEntity oldClient,
ClientDetailsEntity newClient)
Update the oldClient with information from the newClient.
|
public DefaultOAuth2ClientDetailsEntityService()
public ClientDetailsEntity saveNewClient(ClientDetailsEntity client)
saveNewClient
in interface ClientDetailsEntityService
public ClientDetailsEntity getClientById(Long id)
getClientById
in interface ClientDetailsEntityService
public ClientDetailsEntity loadClientByClientId(String clientId) throws org.springframework.security.oauth2.common.exceptions.OAuth2Exception, org.springframework.security.oauth2.common.exceptions.InvalidClientException, IllegalArgumentException
loadClientByClientId
in interface ClientDetailsEntityService
loadClientByClientId
in interface org.springframework.security.oauth2.provider.ClientDetailsService
org.springframework.security.oauth2.common.exceptions.OAuth2Exception
org.springframework.security.oauth2.common.exceptions.InvalidClientException
IllegalArgumentException
public void deleteClient(ClientDetailsEntity client) throws org.springframework.security.oauth2.common.exceptions.InvalidClientException
deleteClient
in interface ClientDetailsEntityService
org.springframework.security.oauth2.common.exceptions.InvalidClientException
public ClientDetailsEntity updateClient(ClientDetailsEntity oldClient, ClientDetailsEntity newClient) throws IllegalArgumentException
updateClient
in interface ClientDetailsEntityService
IllegalArgumentException
public Collection<ClientDetailsEntity> getAllClients()
getAllClients
in interface ClientDetailsEntityService
public ClientDetailsEntity generateClientId(ClientDetailsEntity client)
generateClientId
in interface ClientDetailsEntityService
public ClientDetailsEntity generateClientSecret(ClientDetailsEntity client)
generateClientSecret
in interface ClientDetailsEntityService
Copyright © 2018. All rights reserved.