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.RegisteredClientRepositoryThe Interface OAuthClientDetailsService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuthClientaddClient(OAuthClient client)Register a new OAuth client.List<OAuthClient>autocompleteClients(String title, int limit)Autocomplete OAuth clients by title.OAuthClientgetClient(String clientId)Gets the client.booleanisOriginRegistered(String origin)Check if the origin is registered with one of the clientsList<OAuthClient>listClientDetails()List 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.OAuthClientloadClientByClientId(String clientId)OAuthClientremoveClient(OAuthClient oauthClient)Removes the client.OAuthClientremoveSecret(OAuthClient oauthClient)Removes the Client secret.StringresetSecret(OAuthClient oauthClient)Generates a new clientSecret.StringsetSecret(OAuthClient oauthClient, String clientSecret)Sets a new clientSecret.OAuthClientupdateClient(long id, int version, OAuthClient updates)Update client.OAuthClientupdateClientId(String sourceId, String targetId)Update clientId.
-
-
-
Method Detail
-
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
OAuthClient getClient(String clientId)
Gets the client.- Parameters:
clientId- the client id- Returns:
- the client
-
addClient
OAuthClient addClient(OAuthClient client)
Register a new OAuth client.- Parameters:
client- the client- Returns:
- the OAuth client
- Since:
- 1.3
-
updateClient
OAuthClient updateClient(long id, int version, OAuthClient updates)
Update client.- Parameters:
id- the idversion- the versionupdates- the updates- Returns:
- the o auth client
-
updateClientId
OAuthClient updateClientId(String sourceId, String targetId)
Update clientId.- Parameters:
sourceId- the source clientIdtargetId- the target clientId- Returns:
- the o auth client
-
removeClient
OAuthClient removeClient(OAuthClient oauthClient)
Removes the client.- Parameters:
oauthClient- the oauth client- Returns:
- the o auth client
-
autocompleteClients
List<OAuthClient> autocompleteClients(String title, int limit)
Autocomplete OAuth clients by title.- Parameters:
title- the titlelimit- maximum number of results- Returns:
- list of auth clients
-
resetSecret
String resetSecret(OAuthClient oauthClient)
Generates a new clientSecret.- Parameters:
oauthClient- the client to regenerate secret for- Returns:
- the new client secret
-
setSecret
String setSecret(OAuthClient oauthClient, String clientSecret)
Sets a new clientSecret.- Parameters:
oauthClient- the client to set a secret forclientSecret- the client secret- Returns:
- the new client secret
-
removeSecret
OAuthClient removeSecret(OAuthClient oauthClient)
Removes the Client secret.- Parameters:
oauthClient- the oauth client- Returns:
- Updated OAuth client
-
isOriginRegistered
boolean isOriginRegistered(String origin)
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
OAuthClient loadClientByClientId(String clientId)
-
-