Crate http_auth

Crate http_auth 

Source
Expand description

HTTP authentication. Currently meant for clients; to be extended for servers.

As described in the following documents and specifications:

This framework is primarily used with HTTP, as suggested by the name. It is also used by some other protocols such as RTSP.

§Cargo Features

featuredefault?description
basic-schemeyessupport for the Basic auth scheme
digest-schemeyessupport for the Digest auth scheme
httpnoconvenient conversion from http crate types, version 0.2
http10noconvenient conversion from http crate types, version 1.0

§Example

In most cases, callers only need to use PasswordClient and PasswordParams to handle Basic and Digest authentication schemes.

The http or http10 features allow parsing all WWW-Authenticate headers within a [http::HeaderMap] in one call.

Re-exports§

pub use parser::ChallengeParser;

Modules§

parser
Parses as in RFC 7235.

Structs§

ChallengeRef
Parsed challenge (scheme and body) using references to the original header value. Produced by crate::parser::ChallengeParser.
ParamValue
Parsed challenge parameter value used within ChallengeRef.
PasswordClientBuilder
Builds a PasswordClient from the supplied challenges; create via PasswordClient::builder.
PasswordParams
Parameters for responding to a password challenge.
ToStrError
An error returned by [HeaderValue::to_str].

Enums§

PasswordClient
Client for responding to a password challenge.

Functions§

parse_challenges
Parses a list of challenges into a Vec.