pub enum AuthError {
MissingHeader,
InvalidToken(String),
ExpiredToken,
RateLimited {
retry_after_secs: u64,
},
InsufficientScope {
required: Scope,
},
}Expand description
Authentication / authorization errors returned by extractors.
Variants§
MissingHeader
No Authorization header was present.
InvalidToken(String)
The token could not be validated (bad format, wrong signature, etc.).
ExpiredToken
The token signature was valid but the token has expired.
RateLimited
The caller has exceeded the per-key rate limit.
InsufficientScope
The caller’s scopes do not satisfy the required scope.
Trait Implementations§
Source§impl IntoResponse for AuthError
impl IntoResponse for AuthError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for AuthError
impl RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnsafeUnpin for AuthError
impl UnwindSafe for AuthError
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