View Source Auth0.Config (Auth0Api v2.5.0)
Documentation for Auth0 Configuration.
properties
- :domain - Auth0 domain
- :api_token - API token
- :client_id - Client ID. This value is ignored when API token is provided.
- :client_secret - Client Secret. This value is ignored when API token is provided.
- :max_request_retry_count - Max retry count of request when rate limit is exceeded.
- :correlation_id - Correlation ID
- :token_cache_disabled - disable token cache
- :clear_token_cache - clear token cache
- :http_protocol -
"https"(default) or"http".nilis treated as"https"and any other value raisesArgumentError."http"is intended only for tests and local mock servers: credentials (API token, client secret, access token) are sent in plain text. When"http"is used with a domain whose host is not a loopback address (localhost,127.0.0.0/8,::1), a warning is logged once per domain. The setting applies to both Management API and Authentication API requests. - :recv_timeout - Timeout in milliseconds for receiving the response once the request has
been sent. Defaults to
5000(nilis treated as the default). Must be a positive integer; any other value raisesArgumentError. A request whose response does not arrive in time returns{:error, :timeout}. - :connect_timeout - Timeout in milliseconds for establishing a connection (name
resolution and TCP connect). Defaults to
8000(nilis treated as the default). Must be a positive integer; any other value raisesArgumentError. Both timeouts apply to Management API and Authentication API requests (including the token requests made by the token cache).
available environment
- AUTH0_DOMAIN - This value is used when
%Config{domain: nil}. - AUTH0_API_TOKEN - This value is used when
%Config{api_token: nil}. - AUTH0_CLIENT_ID - This value is used when
%Config{client_id: nil}. - AUTH0_CLIENT_SECRET - This value is used when
%Config{client_secret: nil}. - AUTH0_MAX_REQUEST_RETRY_COUNT - This value is used when
%Config{max_request_retry_count: nil}.
sensitive values
:api_token and :client_secret are excluded from inspect/2 output (and therefore from
logs and crash reports that inspect the struct). This does not apply to
inspect(config, structs: false) or to maps built with Map.from_struct/1.
Summary
Functions
get API token.
get Client ID..
get Client Secret.
get connect timeout (milliseconds). defaults to 8000.
get Auth0 domain.
get HTTP Protocol. defaults to "https".
get max retry count of request.
get receive timeout (milliseconds). defaults to 5000.
Types
@type config() :: t()
@type t() :: %Auth0.Config{ api_token: String.t() | nil, clear_token_cache: boolean(), client_id: String.t() | nil, client_secret: String.t() | nil, connect_timeout: pos_integer() | nil, correlation_id: String.t() | nil, domain: String.t() | nil, http_protocol: String.t(), max_request_retry_count: integer() | nil, recv_timeout: pos_integer() | nil, token_cache_disabled: boolean() }
Functions
get API token.
get Client ID..
get Client Secret.
@spec get_connect_timeout(config()) :: pos_integer()
get connect timeout (milliseconds). defaults to 8000.
Raises ArgumentError unless the value is nil or a positive integer.
get Auth0 domain.
get HTTP Protocol. defaults to "https".
Only "https" and "http" are accepted (nil is treated as "https"); any other value
raises ArgumentError. When "http" is used with a non-loopback domain, a warning is
logged once per domain in the VM.
get max retry count of request.
@spec get_recv_timeout(config()) :: pos_integer()
get receive timeout (milliseconds). defaults to 5000.
Raises ArgumentError unless the value is nil or a positive integer.