Interface AuthorizedClientService<P extends AuthorizedClient>
-
- Type Parameters:
P- GenerallyAuthorizedClient
- All Known Implementing Classes:
DefaultAuthorizedClientService
public interface AuthorizedClientService<P extends AuthorizedClient>Service interface for managingAuthorizedClient.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Pcreate(P authorizedClient)Create a new authorized client.voiddelete(P authorizedClient)Delete an authorized client.voiddeleteById(String id)Delete an authorized client by ID.booleanexistsById(String id)Check if an authorized client exists by its ID.Optional<P>findAdminClient(String tenantId)Finds the authorized client for the admin within the given context.org.springframework.data.domain.Page<P>findAll(org.springframework.data.domain.Pageable pageable)Find all authorized clients.org.springframework.data.domain.Page<P>findAllByServerId(String serverId, org.springframework.data.domain.Pageable pageable)Finds all authorized clients within an authorization server.Optional<P>findApplicationClient(String applicationId)Finds the authorized client for the application within the given context.Optional<P>findApplicationClient(String applicationId, String tenantId)Finds the authorized client for the application within the given context.Optional<P>findByClientId(String clientId)Find an authorized client by its client ID.Optional<P>findById(String id)Find an authorized client by its ID.Preplace(String id, P authorizedClient)Replace an authorized client.Optional<String>resolveAbsolutePathForUri(String uri, AuthorizedClient client)Resolves the absolute path for the string uri providedOptional<String>resolveAbsolutePathsForRelativeDefaultRedirectUri(AuthorizedClient client)Resolves the absolute path for the default redirect uri on the providedAuthorizedClientSet<String>resolveAbsolutePathsForRelativeRedirectUris(AuthorizedClient client)Resolves the absolute path for the redirect uris on the providedAuthorizedClientSet<String>resolveAbsolutePathsForUris(Set<String> uris, AuthorizedClient client)Resolves the absolute path for the string uris providedPsave(P authorizedClient)Save an authorized client.
-
-
-
Method Detail
-
findAll
org.springframework.data.domain.Page<P> findAll(org.springframework.data.domain.Pageable pageable)
Find all authorized clients.- Parameters:
pageable- the pageable- Returns:
- a page of authorized client
-
findAllByServerId
org.springframework.data.domain.Page<P> findAllByServerId(String serverId, org.springframework.data.domain.Pageable pageable)
Finds all authorized clients within an authorization server.- Parameters:
serverId- the server IDpageable- the pageable- Returns:
- a page of authorized client
-
findAdminClient
Optional<P> findAdminClient(@Nullable String tenantId)
Finds the authorized client for the admin within the given context.- Parameters:
tenantId-- Returns:
- an optional of authorized client
-
findApplicationClient
Optional<P> findApplicationClient(String applicationId, String tenantId)
Finds the authorized client for the application within the given context.- Parameters:
applicationId-tenantId-- Returns:
- an optional of authorized client
-
findApplicationClient
Optional<P> findApplicationClient(String applicationId)
Finds the authorized client for the application within the given context.- Parameters:
applicationId-- Returns:
- an optional of authorized client
-
existsById
boolean existsById(String id)
Check if an authorized client exists by its ID.- Parameters:
id- the authorized client ID- Returns:
- whether or the not the authorized client exists
-
findById
Optional<P> findById(String id)
Find an authorized client by its ID.- Parameters:
id- the authorized client ID- Returns:
- an optional of authorized client
-
findByClientId
Optional<P> findByClientId(String clientId)
Find an authorized client by its client ID.- Parameters:
clientId- the client ID of the authorization client- Returns:
- an optional of authorized client
-
create
P create(P authorizedClient)
Create a new authorized client.AuthorizedClient#getServer()must not be null.- Parameters:
authorizedClient- the authorized client to create- Returns:
- the created authorized client
-
save
P save(P authorizedClient)
Save an authorized client.- Parameters:
authorizedClient- the authorized client to save- Returns:
- the saved authorized client
-
replace
P replace(String id, P authorizedClient)
Replace an authorized client.- Parameters:
id- the authorized client ID to replaceauthorizedClient- the authorized client replacement- Returns:
- the created authorized client
-
delete
void delete(P authorizedClient)
Delete an authorized client.- Parameters:
authorizedClient- the authorized client to delete
-
deleteById
void deleteById(String id)
Delete an authorized client by ID.- Parameters:
id- the ID of the authorized client to delete
-
resolveAbsolutePathsForRelativeDefaultRedirectUri
Optional<String> resolveAbsolutePathsForRelativeDefaultRedirectUri(AuthorizedClient client)
Resolves the absolute path for the default redirect uri on the providedAuthorizedClient- Parameters:
client- TheAuthorizedClientto resolve the default redirect uri for- Returns:
- The absolute path for the default redirect uri on the provided
AuthorizedClientif one is resolved else an emptyOptional
-
resolveAbsolutePathsForRelativeRedirectUris
Set<String> resolveAbsolutePathsForRelativeRedirectUris(AuthorizedClient client)
Resolves the absolute path for the redirect uris on the providedAuthorizedClient- Parameters:
client- TheAuthorizedClientto resolve the redirect uris for- Returns:
- The absolute paths for the redirect uris on the provided
AuthorizedClientthat could be resolved
-
resolveAbsolutePathsForUris
Set<String> resolveAbsolutePathsForUris(Set<String> uris, AuthorizedClient client)
Resolves the absolute path for the string uris provided- Parameters:
uris- The uris to resolve absolute paths forclient- TheAuthorizedClientto use for finding the domain, host, etc.- Returns:
- The uris that could be resolved to absolute paths
-
resolveAbsolutePathForUri
Optional<String> resolveAbsolutePathForUri(String uri, AuthorizedClient client)
Resolves the absolute path for the string uri provided- Parameters:
uri- The uri to resolve the absolute path forclient- TheAuthorizedClientto use for finding the domain, host, etc.- Returns:
- The uri resolved to an absolute path if possible else an empty
Optional
-
-