Class GrantsEntity

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

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

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<GrantsPage> list(String userId, GrantsFilter filter)
      Request all Grants. A token with scope read:grants is needed See https://auth0.com/docs/api/management/v2#!/Grants/get_grants
      Parameters:
      userId - The user id of the grants to retrieve
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String grantId)
      Delete an existing Grant. A token with scope delete:grants is needed. See https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id
      Parameters:
      grantId - The id of the grant to delete.
      Returns:
      a Request to execute.
    • deleteAll

      public Request<Void> deleteAll(String userId)
      Deletes all Grants of a given user. A token with scope delete:grants is needed. See https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id
      Parameters:
      userId - The id of the user whose grants are deleted.
      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)