Class UserBlocksEntity

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

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

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

    • getByIdentifier

      public Request<UserBlocks> getByIdentifier(String identifier)
      Request all the User Blocks for a given identifier. A token with scope read:users is needed. See https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks
      Parameters:
      identifier - the identifier. Either a username, phone_number, or email.
      Returns:
      a Request to execute.
    • deleteByIdentifier

      public Request<Void> deleteByIdentifier(String identifier)
      Delete any existing User Blocks for a given identifier. A token with scope update:users is needed. See https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks
      Parameters:
      identifier - the identifier. Either a username, phone_number, or email.
      Returns:
      a Request to execute.
    • get

      public Request<UserBlocks> get(String userId)
      Request all the User Blocks. A token with scope read:users is needed. See https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks_by_id
      Parameters:
      userId - the user id.
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String userId)
      Delete any existing User Blocks. A token with scope update:users is needed. See https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks_by_id
      Parameters:
      userId - the user id.
      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)