Interface ClientRegistrationRepository
- All Known Implementing Classes:
JdbcClientRegistrationRepository
public interface ClientRegistrationRepository
Port that stores registered clients. An implementation never returns
null.-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByClientId(String clientId) Deletes a client.findAll()Finds every registered client.findByClientId(String clientId) Finds a client by its identifier.voidsave(ClientRegistration registration, String encodedSecret) Inserts a client, or replaces the settings of the stored client that has the same identifier.voidupdateSecret(String clientId, String encodedSecret) Replaces the secret of a client.
-
Method Details
-
findByClientId
Finds a client by its identifier.- Parameters:
clientId- public identifier of the client.- Returns:
- the client, or an empty optional when it is not registered.
-
findAll
List<ClientRegistration> findAll()Finds every registered client.- Returns:
- the clients; empty when there are none.
-
save
Inserts a client, or replaces the settings of the stored client that has the same identifier.- Parameters:
registration- the client.encodedSecret- the encoded client secret, ornullto keep the stored one (a public client has none).
-
deleteByClientId
Deletes a client.- Parameters:
clientId- public identifier of the client.
-
updateSecret
Replaces the secret of a client.- Parameters:
clientId- public identifier of the client.encodedSecret- the new encoded secret.
-