pub enum VerifyError {
InvalidFormat,
SignatureInvalid,
Expired,
IssuerInvalid,
AudienceInvalid,
MissingClaim(&'static str),
KeysetUnavailable,
Other(String),
}Expand description
Verification failure surface.
One variant per logical failure class. The PAS-engine variants
(SignatureInvalid, Expired, IssuerMismatch, AudienceMismatch,
MissingClaim, KeysetUnavailable) reflect the boundary contract:
audit logs map them 1:1 to engine AuthError rows. Adapter-side
variants (InvalidFormat) cover failures upstream of engine entry.
Variants§
InvalidFormat
Bearer string did not parse as a JWS Compact serialization. Adapter-side reject before engine entry.
SignatureInvalid
Cryptographic signature verification failed (engine M16).
Expired
exp claim is in the past (engine M19).
IssuerInvalid
iss did not match Expectations::issuer (engine M23). The
engine does not expose the actual value because the failed
match means we cannot trust any payload field — the SDK
surfaces just “issuer invalid” and the audit log carries the
caller’s expected value alongside this variant.
AudienceInvalid
aud did not match Expectations::audience (engine M21/M22).
MissingClaim(&'static str)
A required claim was absent or malformed.
JWKS fetch failed and there is no usable cached snapshot
(initial bootstrap failure or with_initial constructed with
an empty key set). Distinct from SignatureInvalid so audit
logs distinguish “we couldn’t even attempt verification” from
“verification failed.”
Other(String)
Catch-all for engine variants that don’t map to a structural
SDK rejection. Carries the engine’s AuthError Display so the
audit log retains the M-code.
Trait Implementations§
Source§impl Clone for VerifyError
impl Clone for VerifyError
Source§fn clone(&self) -> VerifyError
fn clone(&self) -> VerifyError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifyError
impl Debug for VerifyError
Source§impl Display for VerifyError
impl Display for VerifyError
Source§impl Error for VerifyError
impl Error for VerifyError
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 VerifyError
impl PartialEq for VerifyError
impl Eq for VerifyError
impl StructuralPartialEq for VerifyError
Auto Trait Implementations§
impl Freeze for VerifyError
impl RefUnwindSafe for VerifyError
impl Send for VerifyError
impl Sync for VerifyError
impl Unpin for VerifyError
impl UnsafeUnpin for VerifyError
impl UnwindSafe for VerifyError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.