pub trait AuthProvider: Send + Sync {
// Required methods
fn scheme(&self) -> AuthScheme;
fn build_authorization_header(
&self,
challenge: &AuthChallenge,
) -> Result<String>;
}Expand description
Trait for HTTP authentication providers.
Implementations of this trait handle the construction of Authorization headers based on server challenges. Both Basic and Digest authentication implement this trait.
Required Methods§
Sourcefn scheme(&self) -> AuthScheme
fn scheme(&self) -> AuthScheme
Returns the authentication scheme this provider implements.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".