Struct Challenge
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§
§impl Challenge
impl Challenge
pub fn parse(value: &[u8], from_proxy: bool) -> Option<Challenge>
pub fn parse(value: &[u8], from_proxy: bool) -> Option<Challenge>
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.
pub 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more