Class ConnectionsEntity

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

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

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<ConnectionsPage> listAll(ConnectionFilter filter)
      Request all the ConnectionsEntity. A token with scope read:connections is needed. See https://auth0.com/docs/api/management/v2#!/Connections/get_connections
      Parameters:
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • get

      public Request<Connection> get(String connectionId, ConnectionFilter filter)
      Request a Connection. A token with scope read:connections is needed. See https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id
      Parameters:
      connectionId - the id of the connection to retrieve.
      filter - the filter to use. Can be null.
      Returns:
      a Request to execute.
    • create

      public Request<Connection> create(Connection connection)
      Create a Connection. A token with scope create:connections is needed. See https://auth0.com/docs/api/management/v2#!/Connections/post_connections
      Parameters:
      connection - the connection data to set.
      Returns:
      a Request to execute.
    • delete

      public Request<Void> delete(String connectionId)
      Delete an existing Connection. A token with scope delete:connections is needed. See https://auth0.com/docs/api/management/v2#!/Connections/delete_connections_by_id
      Parameters:
      connectionId - the connection id.
      Returns:
      a Request to execute.
    • update

      public Request<Connection> update(String connectionId, Connection connection)
      Update an existing Connection. A token with scope update:connections is needed. Note that if the 'options' value is present it will override all the 'options' values that currently exist. See https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id
      Parameters:
      connectionId - the connection id.
      connection - the connection data to set. It can't include name or strategy.
      Returns:
      a Request to execute.
    • deleteUser

      public Request<Void> deleteUser(String connectionId, String email)
      Delete an existing User from the given Database Connection. A token with scope delete:users is needed. See https://auth0.com/docs/api/management/v2#!/Connections/delete_users_by_email
      Parameters:
      connectionId - the connection id where the user is stored.
      email - the email of the user 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)