Class ClientGrantsEntity

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

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

This class is not thread-safe.

See Also:
ManagementAPI
  • Field Details

    • client

      protected final okhttp3.OkHttpClient client
    • baseUrl

      protected final okhttp3.HttpUrl baseUrl
    • apiToken

      protected final String apiToken
  • Method Details

    • list

      public Request<ClientGrantsPage> list(ClientGrantsFilter filter)
      Request all the Client Grants. A token with scope read:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants
      Parameters:
      filter - the filter to use. Can be null
      Returns:
      a Request to execute.
    • list

      Deprecated.
      Calling this method will soon stop returning the complete list of client grants and instead, limit to the first page of results. Please use list(ClientGrantsFilter) instead as it provides pagination support.
      Request all the Client Grants. A token with scope read:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants
      Returns:
      a Request to execute.
    • create

      public Request<ClientGrant> create(String clientId, String audience, String[] scope)
      Create a Client Grant. A token with scope create:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/post_client_grants
      Parameters:
      clientId - the application's client id to associate this grant with.
      audience - the audience of the grant.
      scope - the scope to grant.
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String clientGrantId)
      Delete an existing Client Grant. A token with scope delete:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/delete_client_grants_by_id
      Parameters:
      clientGrantId - the client grant id.
      Returns:
      a Request to execute.
    • update

      public Request<ClientGrant> update(String clientGrantId, String[] scope)
      Update an existing Client Grant. A token with scope update:client_grants is needed. See https://auth0.com/docs/api/management/v2#!/Client_Grants/patch_client_grants_by_id
      Parameters:
      clientGrantId - the client grant id.
      scope - the scope to grant.
      Returns:
      a Request to execute.