#[non_exhaustive]pub enum IdentityError {
Show 15 variants
Malformed(String),
MissingKid,
UnknownKid(String),
AlgorithmRejected {
alg: String,
kid: String,
},
Verification(String),
TtlTooLong(u64),
BadTimestamps {
iat: u64,
exp: u64,
},
FutureIat {
iat: u64,
now: u64,
},
EmptyField(&'static str),
SpoofingCharacter(&'static str),
BadIssuer(String),
Jwks(String),
ScopeEscalation {
scope: String,
},
ExpEscalation {
child: u64,
parent: u64,
},
ChainTooDeep(usize),
}Expand description
Identity validation failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed(String)
Token structurally malformed.
MissingKid
Header lacks a kid.
UnknownKid(String)
No key registered for this kid.
AlgorithmRejected
Token alg is not accepted, or does not match the key type for its
kid (algorithm-confusion defense).
Verification(String)
Signature invalid / expired / nbf future / wrong audience — collapsed by jsonwebtoken; the detail string preserves the cause.
TtlTooLong(u64)
exp - iat exceeds the 15-minute NHI cap.
BadTimestamps
exp ≤ iat or other timestamp nonsense.
FutureIat
iat is unreasonably far in the future.
EmptyField(&'static str)
Required identity field empty.
SpoofingCharacter(&'static str)
Field carries a bidi override or zero-width character that would spoof how the identity renders in a log or audit view.
BadIssuer(String)
Issuer not in the allowlist.
Jwks(String)
JWKS document was malformed or contained no supported signing keys.
ScopeEscalation
Child scopes exceed parent scopes.
ExpEscalation
Child outlives parent.
ChainTooDeep(usize)
Delegation chain deeper than permitted.
Trait Implementations§
Source§impl Debug for IdentityError
impl Debug for IdentityError
Source§impl Display for IdentityError
impl Display for IdentityError
Source§impl Error for IdentityError
impl Error for IdentityError
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
use the Display impl or to_string()
Source§impl PartialEq for IdentityError
impl PartialEq for IdentityError
Source§fn eq(&self, other: &IdentityError) -> bool
fn eq(&self, other: &IdentityError) -> bool
self and other values to be equal, and is used by ==.impl Eq for IdentityError
impl StructuralPartialEq for IdentityError
Auto Trait Implementations§
impl Freeze for IdentityError
impl RefUnwindSafe for IdentityError
impl Send for IdentityError
impl Sync for IdentityError
impl Unpin for IdentityError
impl UnsafeUnpin for IdentityError
impl UnwindSafe for IdentityError
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.