Class ClientsEntity

java.lang.Object
com.auth0.client.mgmt.ClientsEntity

public class ClientsEntity extends Object
Class that provides an implementation of the Application methods of the Management API as defined in https://auth0.com/docs/api/management/v2#!/Clients

This class is not thread-safe.

See Also:
  • Field Details

    • client

      protected final Auth0HttpClient client
    • baseUrl

      protected final okhttp3.HttpUrl baseUrl
    • tokenProvider

      protected final TokenProvider tokenProvider
  • Method Details

    • list

      public Request<ClientsPage> list(ClientFilter filter)
      Request all the Applications. A token with scope read:clients is needed. If you also need the client_secret and encryption_key attributes the token must have read:client_keys scope. See https://auth0.com/docs/api/management/v2#!/Clients/get_clients
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • get

      public Request<Client> get(String clientId)
      Request an Application. A token with scope read:clients is needed. If you also need the client_secret and encryption_key attributes the token must have read:client_keys scope. See https://auth0.com/docs/api/management/v2#!/Clients/get_clients_by_id
      Parameters:
      clientId - the application's client id.
      Returns:
      a Request to execute.
    • get

      public Request<Client> get(String clientId, FieldsFilter filter)
      Request an Application. A token with scope read:clients is needed. If you also need the client_secret and encryption_key attributes the token must have read:client_keys scope. See https://auth0.com/docs/api/management/v2#!/Clients/get_clients_by_id
      Parameters:
      clientId - the application's client id.
      filter - optional filter to restrict fields (to be included/excluded in response)
      Returns:
      a Request to execute.
    • create

      public Request<Client> create(Client client)
      Create a new Application. A token with scope create:clients is needed. See https://auth0.com/docs/api/management/v2#!/Clients/post_clients
      Parameters:
      client - the application data to set.
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String clientId)
      Delete an existing Application. A token with scope delete:clients is needed. See https://auth0.com/docs/api/management/v2#!/Clients/delete_clients_by_id
      Parameters:
      clientId - the application's client id.
      Returns:
      a Request to execute.
    • update

      public Request<Client> update(String clientId, Client client)
      Update an existing Application. A token with scope update:clients is needed. If you also need to update the client_secret and encryption_key attributes the token must have update:client_keys scope. See https://auth0.com/docs/api/management/v2#!/Clients/patch_clients_by_id
      Parameters:
      clientId - the application's client id.
      client - the application data to set.
      Returns:
      a Request to execute.
    • rotateSecret

      public Request<Client> rotateSecret(String clientId)
      Rotates an Application's client secret. A token with scope update:client_keys is needed. Note that the generated secret is NOT base64 encoded. See https://auth0.com/docs/api/management/v2#!/Clients/post_rotate_secret
      Parameters:
      clientId - the application's client id.
      Returns:
      a Request to execute.
    • createCredential

      public Request<Credential> createCredential(String clientId, Credential credential)
      Creates an Application's client credential. A token with scope create:client_credentials is required.
      Parameters:
      clientId - the application's client id.
      credential - the credential to create.
      Returns:
      a Request to execute.
    • listCredentials

      public Request<List<Credential>> listCredentials(String clientId)
      Get the client credentials associated with this application. A token with scope read:client_credentials is required.
      Parameters:
      clientId - the ID of the application
      Returns:
      a request to execute.
    • getCredential

      public Request<Credential> getCredential(String clientId, String credentialId)
      Get a client credentials object. A token with scope read:client_credentials is required.
      Parameters:
      clientId - the ID of the application.
      credentialId - the ID of the credential to retrieve.
      Returns:
      a request to execute.
    • deleteCredential

      public Request<Void> deleteCredential(String clientId, String credentialId)
      Deletes a client credential. A token with scope is required.
      Parameters:
      clientId - the ID of the application.
      credentialId - the ID of the credential to delete
      Returns:
      a request to execute.
    • voidRequest

      protected Request<Void> voidRequest(HttpMethod method, Consumer<com.auth0.client.mgmt.RequestBuilder<Void>> customizer)
    • request

      protected <T> Request<T> request(HttpMethod method, com.fasterxml.jackson.core.type.TypeReference<T> target, Consumer<com.auth0.client.mgmt.RequestBuilder<T>> customizer)