#[non_exhaustive]pub enum SignatureVerificationError {
AmbiguousKeyId(String),
CryptoError(String),
DisallowedAlg(String),
InvalidKey(String),
NoMatchingKey,
UnsupportedAlg(String),
Other(String),
}
Expand description
Error verifying claims signature.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AmbiguousKeyId(String)
More than one key matches the supplied key constraints (e.g., key ID).
CryptoError(String)
Invalid signature for the supplied claims and signing key.
DisallowedAlg(String)
The supplied signature algorithm is disallowed by the verifier.
InvalidKey(String)
The supplied key cannot be used in this context. This may occur if the key type does not match the signature type (e.g., an RSA key used to validate an HMAC) or the JWK usage disallows signatures.
NoMatchingKey
The signing key needed for verifying the
JSON Web Token’s signature/MAC could not be found.
This error can occur if the key ID (kid
) specified in the JWT’s
JOSE header does not match the ID of any
key in the OpenID Connect provider’s JSON Web Key Set (JWKS), typically retrieved from
the provider’s JWKS document. To support
rotation of asymmetric signing keys, client applications
should consider refreshing the JWKS document (via
JsonWebKeySet::fetch
).
This error can also occur if the identified JSON Web Key is of the wrong type (e.g., an RSA key when the JOSE header specifies an ECDSA algorithm) or does not support signing.
UnsupportedAlg(String)
Unsupported signature algorithm.
Other(String)
An unexpected error occurred.
Trait Implementations§
Source§impl Clone for SignatureVerificationError
impl Clone for SignatureVerificationError
Source§fn clone(&self) -> SignatureVerificationError
fn clone(&self) -> SignatureVerificationError
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SignatureVerificationError
impl Debug for SignatureVerificationError
Source§impl Display for SignatureVerificationError
impl Display for SignatureVerificationError
Source§impl Error for SignatureVerificationError
impl Error for SignatureVerificationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl PartialEq for SignatureVerificationError
impl PartialEq for SignatureVerificationError
Source§fn eq(&self, other: &SignatureVerificationError) -> bool
fn eq(&self, other: &SignatureVerificationError) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for SignatureVerificationError
Auto Trait Implementations§
impl Freeze for SignatureVerificationError
impl RefUnwindSafe for SignatureVerificationError
impl Send for SignatureVerificationError
impl Sync for SignatureVerificationError
impl Unpin for SignatureVerificationError
impl UnwindSafe for SignatureVerificationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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