View Source Auth0.Management.Hooks (Auth0Api v2.5.1)

Facade for the Auth0 Management API Hooks endpoints.

Most applications should call Auth0.Api.Management instead of this module.

Deprecated: Auth0 Hooks are deprecated (end of life announced by Auth0). Migrate to Actions (Auth0.Management.Actions). The corresponding Auth0.Api.Management functions are marked with @deprecated.

Summary

Functions

Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets.

Create a new hook.

Delete a hook.

Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete.

Retrieve a hook by its ID. Accepts a list of fields to include in the result.

Retrieve a hook's secrets by the ID of the hook.

Retrieve all hooks. Accepts a list of fields to include or exclude in the result.

Update an existing hook.

Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.

Types

@type config() :: Auth0.Config.t()
@type error() :: {:error, integer(), term()} | {:error, term()}
@type id() :: String.t()
@type value_params() :: %{:value => list() | map(), optional(any()) => any()}

Functions

Link to this function

add_secrets(id, params, config)

View Source
@spec add_secrets(id(), value_params(), config()) ::
  {:ok, map() | String.t()} | error()

Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets.

see

https://auth0.com/docs/api/management/v2/hooks/post-secrets

@spec create(map(), config()) :: {:ok, map()} | error()

Create a new hook.

see

https://auth0.com/docs/api/management/v2/hooks/post-hooks

@spec delete(id(), config()) :: {:ok, String.t()} | error()

Delete a hook.

see

https://auth0.com/docs/api/management/v2/hooks/delete-hooks-by-id

Link to this function

delete_secrets(id, params, config)

View Source
@spec delete_secrets(id(), value_params(), config()) :: {:ok, String.t()} | error()

Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete.

see

https://auth0.com/docs/api/management/v2/hooks/delete-secrets

@spec get(id(), map(), config()) :: {:ok, map()} | error()

Retrieve a hook by its ID. Accepts a list of fields to include in the result.

see

https://auth0.com/docs/api/management/v2/hooks/get-hooks-by-id

@spec get_secrets(id(), config()) :: {:ok, map()} | error()

Retrieve a hook's secrets by the ID of the hook.

see

https://auth0.com/docs/api/management/v2/hooks/get-secrets

@spec list(map(), config()) :: {:ok, [map()] | map()} | error()

Retrieve all hooks. Accepts a list of fields to include or exclude in the result.

see

https://auth0.com/docs/api/management/v2/hooks/get-hooks

Link to this function

update(id, params, config)

View Source
@spec update(id(), map(), config()) :: {:ok, map()} | error()

Update an existing hook.

see

https://auth0.com/docs/api/management/v2/hooks/patch-hooks-by-id

Link to this function

update_secrets(id, params, config)

View Source
@spec update_secrets(id(), value_params(), config()) ::
  {:ok, map() | String.t()} | error()

Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.

see

https://auth0.com/docs/api/management/v2/hooks/patch-secrets