Interface ClientStorageManager

All Known Subinterfaces:
ClientStorageManagerV2
All Known Implementing Classes:
ClientStorageManagerBase

public interface ClientStorageManager
An interface that defines the basic methods for managing OAuth client data for custom storage implementations.

Custom storage implementations should be extended from ClientStorageManagerBase rather than directly implementing this interface to benefit from the default methods it provides.

Since:
8.3
  • Method Details

    • getClient

      Get a client from storage that corresponds to the given client ID. ClientData objects should be initialized with the data retrieved from storage.
      Parameters:
      clientId - The client id.
      Returns:
      A ClientData with the clientId matching the param. Returns null if the clientId is not found.
      Throws:
      ClientStorageManagementException - Checked exception to indicate the retrieval of client record has failed.
    • getClients

      Retrieve all clients from storage. Each ClientData object should be initialized with the data retrieved from storage.
      Returns:
      A collection of all client records.
      Throws:
      ClientStorageManagementException - Checked exception to indicate the retrieval of client records has failed.
    • addClient

      void addClient(ClientData client) throws ClientStorageManagementException
      Add a client to storage. Implementations should persist the wrapped data of the given ClientData object.
      Parameters:
      client - The client object.
      Throws:
      ClientStorageManagementException - Checked exception to indicate failure talking with storage.
    • deleteClient

      void deleteClient(String clientId) throws ClientStorageManagementException
      Delete a client from storage that corresponds to the given client ID.
      Parameters:
      clientId - The client id.
      Throws:
      ClientStorageManagementException - Checked exception to indicate that the operation of removing a client record has failed.
    • updateClient

      void updateClient(ClientData client) throws ClientStorageManagementException
      Update a stored client with the given client data object. Implementations should update the persisted client entry with the wrapped data of the given ClientData object.
      Parameters:
      client - The client object.
      Throws:
      ClientStorageManagementException - Checked exception to indicate that the operation of updating a client record has failed.