Package com.pingidentity.sdk.oauth20
Interface ClientStorageManager
-
- All Known Subinterfaces:
ClientStorageManagerV2
- All Known Implementing Classes:
ClientStorageManagerBase
public interface ClientStorageManagerAn interface that defines the basic methods for managing OAuth client data for custom storage implementations.Custom storage implementations should be extended from
ClientStorageManagerBaserather than directly implementing this interface to benefit from the default methods it provides.- Since:
- 8.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddClient(ClientData client)Add a client to storage.voiddeleteClient(String clientId)Delete a client from storage that corresponds to the given client ID.ClientDatagetClient(String clientId)Get a client from storage that corresponds to the given client ID.Collection<ClientData>getClients()Retrieve all clients from storage.voidupdateClient(ClientData client)Update a stored client with the given client data object.
-
-
-
Method Detail
-
getClient
ClientData getClient(String clientId) throws ClientStorageManagementException
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
Collection<ClientData> getClients() throws ClientStorageManagementException
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.
-
-