pub enum AuthError {
}Expand description
Authentication errors.
Variants§
MissingHeader
No Authorization header at all.
InvalidFormat
The header is present but not Bearer <jwt> or ApiKey <key>.
InvalidToken(String)
A JWT that does not verify, with the reason.
TokenExpired
A JWT whose exp has passed.
MissingClaim(String)
A JWT missing a claim this proxy needs, named.
InvalidApiKey
An API key that matches no stored hash.
ApiKeyDisabled
A key that exists but has been revoked.
ApiKeyExpired
A key past its expires_at.
TenantSuspended
The credential is good but its tenant may not act.
JwtNotConfigured
A JWT was presented and no signing secret is configured, so it cannot be verified. Refused rather than trusted.
UnsupportedAuthMethod
An Authorization scheme this proxy does not implement.
Database(Error)
The lookup itself failed. Ours, not the caller’s – reported as a 500 rather than a 401, so an outage does not read as a bad credential.
Internal(String)
Some other failure of ours. Logged; the caller sees a generic 500.
Trait Implementations§
Source§impl From<ProxyError> for AuthError
impl From<ProxyError> for AuthError
Source§fn from(err: ProxyError) -> Self
fn from(err: ProxyError) -> Self
Converts to this type from the input type.
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 !RefUnwindSafe for AuthError
impl !UnwindSafe for AuthError
impl Freeze for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnsafeUnpin for AuthError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more