Class RulesEntity

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

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

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

    • listAll

      public Request<RulesPage> listAll(RulesFilter filter)
      Request all the Rules. A token with scope read:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/get_rules
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • get

      public Request<Rule> get(String ruleId, RulesFilter filter)
      Request a Rule. A token with scope read:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/get_rules_by_id
      Parameters:
      ruleId - the id of the rule to retrieve.
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • create

      public Request<Rule> create(Rule rule)
      Create a Rule. A token with scope create:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/post_rules
      Parameters:
      rule - the rule data to set
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String ruleId)
      Delete an existing Rule. A token with scope delete:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/delete_rules_by_id
      Parameters:
      ruleId - the rule id
      Returns:
      a Request to execute.
    • update

      public Request<Rule> update(String ruleId, Rule rule)
      Update an existing Rule. A token with scope update:rules is needed. See https://auth0.com/docs/api/management/v2#!/Rules/patch_rules_by_id
      Parameters:
      ruleId - the rule id
      rule - the rule data to set. It can't include 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)