Enum biscuit::errors::ValidationError
source · pub enum ValidationError {
InvalidSignature,
WrongAlgorithmHeader,
MissingRequiredClaims(Vec<String>),
Expired(Duration),
NotYetValid(Duration),
TooOld(Duration),
InvalidIssuer(String),
InvalidAudience(SingleOrMultiple<String>),
KidMissing,
KeyNotFound,
UnsupportedKeyAlgorithm,
MissingAlgorithm,
}
Expand description
Errors from validating tokens
Variants§
InvalidSignature
Token has an invalid signature (RFC7523 3.9)
WrongAlgorithmHeader
Token provided was signed or encrypted with an unexpected algorithm
MissingRequiredClaims(Vec<String>)
A field required is missing from the token The parameter shows the name of the missing claim
Expired(Duration)
The token’s expiry has passed (exp check failled, RFC7523 3.4) The parameter show how long the token has expired
NotYetValid(Duration)
The token is not yet valid (nbf check failed, RFC7523 3.5) The parameter show how much longer the token will start to be valid
TooOld(Duration)
The token has been created too far in the past (iat check failed, RFC7523 3.6) This is different from Expired because the token may not be expired yet, but the acceptor of the token may impose more strict requirement for the age of the token for some more sensitive operations. The parameter show how much older the token is than required
InvalidIssuer(String)
The token does not have or has the wrong issuer (iss check failed, RFC7523 3.1)
InvalidAudience(SingleOrMultiple<String>)
The token does not have or has the wrong audience (aud check failed, RFC7523 3.3
KidMissing
The token doesn’t contains the Kid claim in the header
KeyNotFound
The by the Kid specified key, wasn’t found in the KeySet
UnsupportedKeyAlgorithm
The algorithm of the JWK is not supported for validating JWTs
MissingAlgorithm
An algorithm is needed for verification but was not provided
Trait Implementations§
source§impl Clone for ValidationError
impl Clone for ValidationError
source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ValidationError
impl Debug for ValidationError
source§impl Display for ValidationError
impl Display for ValidationError
source§impl Error for ValidationError
impl Error for ValidationError
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 From<ValidationError> for Error
impl From<ValidationError> for Error
source§fn from(f: ValidationError) -> Error
fn from(f: ValidationError) -> Error
source§impl PartialEq<ValidationError> for ValidationError
impl PartialEq<ValidationError> for ValidationError
source§fn eq(&self, other: &ValidationError) -> bool
fn eq(&self, other: &ValidationError) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ValidationError
impl StructuralEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations§
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.