Package org.genesys.blocks.oauth.service
Interface OAuthClientService
- All Superinterfaces:
org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
- All Known Implementing Classes:
OAuthServiceImpl
public interface OAuthClientService
extends org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
The Interface OAuthClientDetailsService.
-
Method Summary
Modifier and TypeMethodDescriptionaddClient(OAuthClient client) Register a new OAuth client.autocompleteClients(String title, int limit) Autocomplete OAuth clients by title.Gets the client.booleanisClientActive(String clientId) Check OAuthClient.active.booleanisOriginRegistered(String origin) Check if the origin is registered with one of the clientsList client details.org.springframework.data.domain.Page<OAuthClient>listClientDetails(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) List client details with filtering by predicate.org.springframework.data.domain.Page<OAuthClient>listClientDetails(org.springframework.data.domain.Pageable pageable) List client details.loadClientByClientId(String clientId) Load client byclientId.removeClient(OAuthClient oauthClient) Removes the client.removeSecret(OAuthClient oauthClient) Removes the Client secret.resetSecret(OAuthClient oauthClient) Generates a new clientSecret.setSecret(OAuthClient oauthClient, String clientSecret) Sets a new clientSecret.updateClient(long id, int version, OAuthClient updates) Update client.updateClientId(String sourceId, String targetId) Update clientId.Methods inherited from interface org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
findByClientId, findById, save
-
Method Details
-
listClientDetails
List<OAuthClient> listClientDetails()List client details.- Returns:
- the list
-
listClientDetails
org.springframework.data.domain.Page<OAuthClient> listClientDetails(org.springframework.data.domain.Pageable pageable) List client details.- Parameters:
pageable- the pageable- Returns:
- page with Client details
-
listClientDetails
org.springframework.data.domain.Page<OAuthClient> listClientDetails(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) List client details with filtering by predicate.- Parameters:
predicate- the predicatepageable- the pageable- Returns:
- page with Client details
-
getClient
Gets the client.- Parameters:
clientId- the client id- Returns:
- the client
-
addClient
Register a new OAuth client.- Parameters:
client- the client- Returns:
- the OAuth client
- Since:
- 1.3
-
updateClient
Update client.- Parameters:
id- the idversion- the versionupdates- the updates- Returns:
- the o auth client
-
updateClientId
Update clientId.- Parameters:
sourceId- the source clientIdtargetId- the target clientId- Returns:
- the o auth client
-
removeClient
Removes the client.- Parameters:
oauthClient- the oauth client- Returns:
- the o auth client
-
autocompleteClients
Autocomplete OAuth clients by title.- Parameters:
title- the titlelimit- maximum number of results- Returns:
- list of auth clients
-
resetSecret
Generates a new clientSecret.- Parameters:
oauthClient- the client to regenerate secret for- Returns:
- the new client secret
-
setSecret
Sets a new clientSecret.- Parameters:
oauthClient- the client to set a secret forclientSecret- the client secret- Returns:
- the new client secret
-
removeSecret
Removes the Client secret.- Parameters:
oauthClient- the oauth client- Returns:
- Updated OAuth client
-
isOriginRegistered
Check if the origin is registered with one of the clients- Parameters:
origin- the origin- Returns:
- true if a client exists with this origin, false otherwise
-
loadClientByClientId
Load client byclientId.- Parameters:
clientId- the client ID- Returns:
- fully loaded
OAuthClientornullif client is not found.
-
isClientActive
Check OAuthClient.active.- Parameters:
clientId- the client id- Returns:
- true if client is present and active
-