Struct actix_web_httpauth::extractors::AuthenticationError [−][src]
Authentication error returned by authentication extractors.
Different extractors may extend AuthenticationError
implementation
in order to provide access to inner challenge fields.
Implementations
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]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub 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
[src]
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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.
pub 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>,