Auth0Client.Config (auth0_client v1.1.0)

Copy Markdown View Source

All of the configurations pertaining to Auth0Client.

Summary

Functions

Whether the caller has explicitly opted out of TLS certificate verification.

Options passed through to Req.request/1 on every call.

How many seconds before its expiry a cached management token is refreshed.

Logs a warning when TLS verification has been deliberately disabled.

Functions

dangerously_disable_tls_verification?()

@spec dangerously_disable_tls_verification?() :: boolean()

Whether the caller has explicitly opted out of TLS certificate verification.

Accepts "true" as well as true, so an environment variable behaves the same way as a literal.

domain()

@spec domain() :: String.t()

http_opts()

@spec http_opts() :: list()

Options passed through to Req.request/1 on every call.

Refuses to hand back options that disable TLS certificate verification, unless dangerously_disable_tls_verification is set — see dangerously_disable_tls_verification?/0. Validated on every read rather than once at boot, so a runtime Application.put_env/3 cannot slip past it.

mgmt_client_id()

@spec mgmt_client_id() :: String.t() | nil

mgmt_client_secret()

@spec mgmt_client_secret() :: String.t() | nil

mgmt_token()

@spec mgmt_token() :: String.t() | nil

token_refresh_skew()

@spec token_refresh_skew() :: non_neg_integer()

How many seconds before its expiry a cached management token is refreshed.

A token that expires while a request is in flight is rejected, so it is renewed slightly early. Defaults to 60 seconds.

user_agent()

@spec user_agent() :: String.t()

warn_if_tls_verification_disabled()

@spec warn_if_tls_verification_disabled() :: :ok

Logs a warning when TLS verification has been deliberately disabled.

Called once when the application starts. http_opts/0 cannot warn, because it runs on every request; and once the opt-in is set, nothing else will ever mention it again.