pub struct WwwAuthenticateHeader {
pub domain: Option<Vec<String>>,
pub realm: String,
pub nonce: String,
pub opaque: Option<String>,
pub stale: bool,
pub algorithm: Algorithm,
pub qop: Option<Vec<Qop>>,
pub userhash: bool,
pub charset: Charset,
pub nc: u32,
}
Expand description
WWW-Authenticate header parsed from HTTP header value
Fields§
§domain: Option<Vec<String>>
Domain is a list of URIs that will accept the same digest. None if not given (i.e applies to all)
realm: String
Authorization realm (i.e. hostname, serial number…)
nonce: String
Server nonce
opaque: Option<String>
Server opaque string
stale: bool
True if the server nonce expired. This is sent in response to an auth attempt with an older digest. The response should contain a new WWW-Authenticate header.
algorithm: Algorithm
Hashing algo
qop: Option<Vec<Qop>>
Digest algorithm variant
userhash: bool
Flag that the server supports user-hashes
charset: Charset
Server-supported charset
nc: u32
nc - not part of the received header, but kept here for convenience and incremented each time a response is composed with the same nonce.
Implementations§
Source§impl WwwAuthenticateHeader
impl WwwAuthenticateHeader
Sourcepub fn respond(
&mut self,
secrets: &AuthContext<'_>,
) -> Result<AuthorizationHeader>
pub fn respond( &mut self, secrets: &AuthContext<'_>, ) -> Result<AuthorizationHeader>
Generate an AuthorizationHeader
to be sent to the server in a new request.
The self.nc
field is incremented.
Trait Implementations§
Source§impl Clone for WwwAuthenticateHeader
impl Clone for WwwAuthenticateHeader
Source§fn clone(&self) -> WwwAuthenticateHeader
fn clone(&self) -> WwwAuthenticateHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WwwAuthenticateHeader
impl Debug for WwwAuthenticateHeader
Source§impl Display for WwwAuthenticateHeader
impl Display for WwwAuthenticateHeader
Source§impl FromStr for WwwAuthenticateHeader
impl FromStr for WwwAuthenticateHeader
Source§impl PartialEq for WwwAuthenticateHeader
impl PartialEq for WwwAuthenticateHeader
impl StructuralPartialEq for WwwAuthenticateHeader
Auto Trait Implementations§
impl Freeze for WwwAuthenticateHeader
impl RefUnwindSafe for WwwAuthenticateHeader
impl Send for WwwAuthenticateHeader
impl Sync for WwwAuthenticateHeader
impl Unpin for WwwAuthenticateHeader
impl UnwindSafe for WwwAuthenticateHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes