[][src]Struct typed_headers::ProxyAuthorization

pub struct ProxyAuthorization(pub Credentials);

Proxy-Authorization header, defined in RFC7235

The Proxy-Authorization header field allows a user agent to authenticate itself with an HTTP proxy -- usually, but not necessarily, after receiving a 407 (Proxy Authentication Required) response and the Proxy-Authenticate header. Its value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested.

ABNF

Authorization = credentials

Example values

  • Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
  • Bearer fpKL54jvWmEGVoRdCNjG

Methods from Deref<Target = Credentials>

pub fn scheme(&self) -> &AuthScheme[src]

Returns the auth-scheme associated with the credentials.

pub fn token68(&self) -> Option<&Token68>[src]

Returns the token68 value associated with the credentials if present.

pub fn as_bearer(&self) -> Option<&Token68>[src]

Returns the bearer token if this contains Bearer credentials.

Trait Implementations

impl Header for ProxyAuthorization[src]

impl PartialEq<ProxyAuthorization> for ProxyAuthorization[src]

impl Clone for ProxyAuthorization[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ProxyAuthorization[src]

impl DerefMut for ProxyAuthorization[src]

impl Deref for ProxyAuthorization[src]

type Target = Credentials

The resulting type after dereferencing.

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.