Enum TokenError
pub enum TokenError {
CacheExpired,
EmptyAccessToken,
FetchFailed(Error),
FileReadError(String),
InvalidToken(Error),
MissingId,
UnknownAlgorithm,
UnknownKeyId(String),
}Expand description
Errors that can occur when fetching or forwarding a token.
Variants§
CacheExpired
The keys are not yet populated or TTL elapsed.
EmptyAccessToken
The token endpoint responded successfully but the access_token field was empty.
FetchFailed(Error)
FileReadError(String)
A platform-injected token file could not be read. Carries the file path and OS error message.
InvalidToken(Error)
The JWT signature or standard claims (expiry, issuer) are invalid.
MissingId
A header is missing its kid field.
UnknownAlgorithm
The JWT header names an algorithm this library does not support.
UnknownKeyId(String)
The JWT header names a kid that is not present in the loaded key set.
Trait Implementations§
§impl Debug for TokenError
impl Debug for TokenError
§impl Display for TokenError
impl Display for TokenError
§impl Error for TokenError
impl Error for TokenError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<Error> for TokenError
impl From<Error> for TokenError
§fn from(e: Error) -> TokenError
fn from(e: Error) -> TokenError
Converts to this type from the input type.
§impl From<TokenError> for AuthError
impl From<TokenError> for AuthError
§fn from(value: TokenError) -> AuthError
fn from(value: TokenError) -> AuthError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TokenError
impl !RefUnwindSafe for TokenError
impl Send for TokenError
impl Sync for TokenError
impl Unpin for TokenError
impl UnsafeUnpin for TokenError
impl !UnwindSafe for TokenError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].