Interface ClientRegistrationRepository

All Known Implementing Classes:
JdbcClientRegistrationRepository

public interface ClientRegistrationRepository
Port that stores registered clients. An implementation never returns null.
  • Method Details

    • findByClientId

      Optional<ClientRegistration> findByClientId(String clientId)
      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

      Finds every registered client.
      Returns:
      the clients; empty when there are none.
    • save

      void save(ClientRegistration registration, String encodedSecret)
      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, or null to keep the stored one (a public client has none).
    • deleteByClientId

      void deleteByClientId(String clientId)
      Deletes a client.
      Parameters:
      clientId - public identifier of the client.
    • updateSecret

      void updateSecret(String clientId, String encodedSecret)
      Replaces the secret of a client.
      Parameters:
      clientId - public identifier of the client.
      encodedSecret - the new encoded secret.