pub struct Challenge {
pub realm: String,
pub nonce: String,
pub opaque: Option<String>,
pub algorithm: Algorithm,
pub qop_auth: bool,
pub stale: bool,
pub from_proxy: bool,
}Expand description
A challenge from a WWW-Authenticate or Proxy-Authenticate header.
Fields§
§realm: StringThe protection space.
nonce: StringThe server’s nonce.
opaque: Option<String>An opaque value to echo back verbatim.
algorithm: AlgorithmThe algorithm; absent means MD5.
qop_auth: boolWhether the server offered qop=auth.
stale: boolWhether the server says the nonce is merely stale, so the password is still good.
from_proxy: boolWhether this came from a proxy, which decides the header used to answer it.
Implementations§
Source§impl Challenge
impl Challenge
Sourcepub fn parse(value: &[u8], from_proxy: bool) -> Option<Self>
pub fn parse(value: &[u8], from_proxy: bool) -> Option<Self>
Parse one challenge header value.
Returns None for a scheme that is not Digest — Basic exists in the grammar and must
never be used for SIP, since it sends the password.
Sourcepub fn response_header(&self) -> HeaderName
pub fn response_header(&self) -> HeaderName
The header this challenge must be answered in.
Trait Implementations§
impl Eq for Challenge
impl StructuralPartialEq for Challenge
Auto Trait Implementations§
impl Freeze for Challenge
impl RefUnwindSafe for Challenge
impl Send for Challenge
impl Sync for Challenge
impl Unpin for Challenge
impl UnsafeUnpin for Challenge
impl UnwindSafe for Challenge
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
Mutably borrows from an owned value. Read more