Bounded, redirect-free HTTP boundary for OAuth protocol requests.
The destination is resolved once, every returned address is checked against
the network policy, and the request URL is rewritten to the selected address.
The original host is retained in the HTTP Host header and TLS SNI, so DNS
cannot be re-resolved between validation and connection establishment.
Response bodies are read incrementally and the connection is closed as soon
as the configured size limit is exceeded.
Plain HTTP is accepted only for loopback development endpoints. Private
HTTPS endpoints are rejected by default and may be enabled only by listing
their exact hostname in :allowed_private_hosts.
Summary
Types
Functions
Returns the effective configuration after application and call overrides.
@spec request( atom(), String.t(), [{String.t(), String.t()}], iodata() | nil, keyword() ) :: {:ok, response()} | {:error, term()}
Sends one request through the hardened OAuth HTTP boundary.
The response shape matches :httpc.request/4, but the body is always a
binary. Redirects are returned to the caller and are never followed.
@spec resolve_target( String.t(), keyword() ) :: {:ok, URI.t(), :inet.ip_address()} | {:error, term()}
Validates and resolves a URL under the same policy used by request/5.
The returned address is the address that a caller must connect to in order to preserve the validation result.