[−][src]Struct actix_web_httpauth::extractors::AuthenticationError
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]
T: Into<Cow<'static, str>>,
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]
T: Into<Cow<'static, str>>,
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]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl<T> From<T> for AuthenticationError<<T as AuthExtractorConfig>::Inner> where
T: AuthExtractorConfig,
[src]
T: AuthExtractorConfig,
impl<C: 'static + Challenge> ResponseError for AuthenticationError<C>
[src]
fn error_response(&self) -> HttpResponse
[src]
fn status_code(&self) -> StatusCode
Auto Trait Implementations
impl<C> RefUnwindSafe for AuthenticationError<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for AuthenticationError<C>
impl<C> Sync for AuthenticationError<C>
impl<C> Unpin for AuthenticationError<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for AuthenticationError<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsFail for T where
T: Fail,
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
E: 'static + Error + Send + Sync,
fn name(&self) -> Option<&str>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn backtrace(&self) -> Option<&Backtrace>
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
D: Display + Send + Sync + 'static,
fn compat(self) -> Compat<Self>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,