[][src]Struct actix_web_httpauth::extractors::AuthenticationError

pub struct AuthenticationError<C: Challenge> { /* fields omitted */ }

Authentication error returned by authentication extractors.

Different extractors may extend AuthenticationError implementation in order to provide access to inner challenge fields.

Methods

impl AuthenticationError<Bearer>[src]

Extended error customization for HTTP Bearer auth.

pub fn with_error(self, kind: Error) -> Self[src]

Attach Error to the current Authentication error.

Error status code will be changed to the one provided by the kind Error.

pub fn with_error_description<T>(self, desc: T) -> Self where
    T: Into<Cow<'static, str>>, 
[src]

Attach error description to the current Authentication error.

pub fn with_error_uri<T>(self, uri: T) -> Self where
    T: Into<Cow<'static, str>>, 
[src]

Attach error URI to the current Authentication error.

It is up to implementor to provide properly formed absolute URI.

impl<C: Challenge> AuthenticationError<C>[src]

pub fn new(challenge: C) -> AuthenticationError<C>[src]

Creates new authentication error from the provided challenge.

By default returned error will resolve into the HTTP 401 status code.

pub fn challenge_mut(&mut self) -> &mut C[src]

Returns mutable reference to the inner challenge instance.

pub fn status_code_mut(&mut self) -> &mut StatusCode[src]

Returns mutable reference to the inner status code.

Can be used to override returned status code, but by default this lib tries to stick to the RFC, so it might be unreasonable.

Trait Implementations

impl<C: Debug + Challenge> Debug for AuthenticationError<C>[src]

impl<C: Challenge> Display for AuthenticationError<C>[src]

impl<C: 'static + Challenge> Error for AuthenticationError<C>[src]

impl<T> From<T> for AuthenticationError<<T as AuthExtractorConfig>::Inner> where
    T: AuthExtractorConfig
[src]

impl<C: 'static + Challenge> ResponseError for AuthenticationError<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for AuthenticationError<C> where
    C: RefUnwindSafe

impl<C> Send for AuthenticationError<C>

impl<C> Sync for AuthenticationError<C>

impl<C> Unpin for AuthenticationError<C> where
    C: Unpin

impl<C> UnwindSafe for AuthenticationError<C> where
    C: UnwindSafe

Blanket Implementations

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

impl<T> AsFail for T where
    T: Fail, 

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

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

impl<E> Fail for E where
    E: 'static + Error + Send + Sync

impl<T> From<T> for T[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,