Class IdmApiClientService

java.lang.Object
org.forgerock.openig.fapi.apiclient.service.idm.IdmApiClientService
All Implemented Interfaces:
ApiClientService

public class IdmApiClientService extends Object implements ApiClientService
ApiClientService implementation which manages ApiClient data in IDM.
  • Method Details

    • create

      public Promise<ApiClient,ApiClientServiceException> create(Context context, String oAuth2ClientId, SoftwareStatement softwareStatement)
      Creates an ApiClient in IDM.
      Specified by:
      create in interface ApiClientService
      Parameters:
      oAuth2ClientId - the OAuth2.0 client_id of the client
      softwareStatement - the software statement the client used in their DCR request
      context - the current context within which the operation is being performed
      Returns:
      a Promise with the created ApiClient as the result or an ApiClientServiceException if the create operation fails
    • get

      public Promise<ApiClient,ApiClientServiceException> get(Context context, String oAuth2ClientId)
      Retrieves an ApiClient from IDM.
      Specified by:
      get in interface ApiClientService
      Parameters:
      oAuth2ClientId - the OAuth2.0 client_id of the client
      context - the current context within which the operation is being performed
      Returns:
      a Promise with the retrieved ApiClient as the result or an ApiClientServiceException if the get operation fails
    • update

      public Promise<ApiClient,ApiClientServiceException> update(Context context, String oAuth2ClientId, SoftwareStatement softwareStatement)
      Updates an ApiClient in IDM.
      Specified by:
      update in interface ApiClientService
      Parameters:
      oAuth2ClientId - the OAuth2.0 client_id of the client
      softwareStatement - the software statement the client used in their DCR request
      context - the current context within which the operation is being performed
      Returns:
      a Promise with the updated ApiClient as the result or an ApiClientServiceException if the update operation fails
    • delete

      public Promise<ApiClient,ApiClientServiceException> delete(Context context, String oAuth2ClientId)
      Deletes an ApiClient in IDM.

      This is a soft delete, the ApiClient's deleted field is set to true by sending an IDM patch request.

      Specified by:
      delete in interface ApiClientService
      Parameters:
      oAuth2ClientId - String the apiClientId to delete
      context - the current context within which the operation is being performed
      Returns:
      Promise with either the deleted ApiClient as the result or an ApiClientServiceException if the delete operation fails