pub enum AuthReason {
MissingCredential,
InvalidCredential,
ExpiredCredential,
InsufficientScope,
ProxyRequired,
Unauthorized,
}Expand description
The closed set of reason codes.
Readers must treat an unrecognised code as AuthReason::Unauthorized —
that means the server is newer, not broken.
Variants§
MissingCredential
No credential was presented at all.
InvalidCredential
A credential was presented and rejected.
ExpiredCredential
Well-formed, but outside its validity window.
InsufficientScope
Identified, but not permitted.
Deliberately a 401 rather than a 403: the authenticate callback runs before any method is resolved, so there is no route yet whose permissions could be evaluated. A service wanting a true 403 raises it from the method body.
ProxyRequired
The request carried no evidence of arriving through the trusted proxy. Derived from server configuration, never from the request.
Refused, unclassified. The fallback.
Implementations§
Trait Implementations§
Source§impl Clone for AuthReason
impl Clone for AuthReason
Source§fn clone(&self) -> AuthReason
fn clone(&self) -> AuthReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AuthReason
Source§impl Debug for AuthReason
impl Debug for AuthReason
Source§impl Display for AuthReason
impl Display for AuthReason
impl Eq for AuthReason
Source§impl Hash for AuthReason
impl Hash for AuthReason
Source§impl PartialEq for AuthReason
impl PartialEq for AuthReason
impl StructuralPartialEq for AuthReason
Auto Trait Implementations§
impl Freeze for AuthReason
impl RefUnwindSafe for AuthReason
impl Send for AuthReason
impl Sync for AuthReason
impl Unpin for AuthReason
impl UnsafeUnpin for AuthReason
impl UnwindSafe for AuthReason
Blanket Implementations§
impl<T> Allocation for T
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