#[non_exhaustive]pub enum HttpClient {
Reqwest(Client),
}Expand description
Re-exported from axum_security_oauth2: the shared HTTP backend used for
discovery and JWKS fetches (clone the login flow’s client in so both ride
one connection pool), the CsrfToken carried by OidcLogin, and the
ConfigError wrapped by OidcBuilderError::OAuth2.
The HTTP backend used for token requests.
A feature-gated enum rather than a trait: enabling a backend feature adds a variant, and the client stays free of type parameters. Backends must never follow redirects; the ones this crate constructs don’t.
Clone is cheap — the reqwest backend shares one connection pool across
clones — so a single backend can be handed to several clients (e.g.
axum-security-oidc reuses the login client’s backend for discovery and
JWKS fetches).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn default_reqwest() -> HttpClient
pub fn default_reqwest() -> HttpClient
The default reqwest backend: redirects never followed, 10 second timeout — the same client the builder installs when none is given.
Source§impl HttpClient
impl HttpClient
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HttpClient
impl Debug for HttpClient
Source§impl From<Client> for HttpClient
Available on crate feature reqwest only.
impl From<Client> for HttpClient
reqwest only.