Package org.forgerock.openidconnect
Class ClientDAO
- java.lang.Object
-
- org.forgerock.openidconnect.ClientDAO
-
@Singleton public class ClientDAO extends Object
Interface to do basic CRUD operations on a OAuth2Client.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description ClientDAO(AMIdentityRepositoryFactory idRepoFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(Client client, OAuth2Request request)
Stores a client to a storage system.void
delete(String clientId, OAuth2Request request)
Delete a client from the storage system.Client
read(String clientId, OAuth2Request request)
Reads a client from a storage system.void
update(Client client, OAuth2Request request)
Updates a client already stored.
-
-
-
Constructor Detail
-
ClientDAO
@Inject public ClientDAO(AMIdentityRepositoryFactory idRepoFactory)
-
-
Method Detail
-
create
public void create(Client client, OAuth2Request request) throws InvalidClientMetadata
Stores a client to a storage system.- Parameters:
client
- The client to store- Throws:
InvalidClientMetadata
- If the client's registration details are invalid.
-
read
public Client read(String clientId, OAuth2Request request) throws UnauthorizedClientException
Reads a client from a storage system.- Parameters:
clientId
- The client id of the client to retrieve.- Returns:
- A Client read from the storage system.
- Throws:
UnauthorizedClientException
- If the client's authorization fails.
-
update
public void update(Client client, OAuth2Request request) throws InvalidClientMetadata, UnauthorizedClientException
Updates a client already stored.- Parameters:
client
- The updated client to use to update the storage.- Throws:
InvalidClientMetadata
- If the client's registration details are invalid.UnauthorizedClientException
- If the client's authorization fails.
-
delete
public void delete(String clientId, OAuth2Request request) throws UnauthorizedClientException
Delete a client from the storage system.- Parameters:
clientId
- The client id of the client to delete.- Throws:
UnauthorizedClientException
- If the client's authorization fails.
-
-