Skip to main content

VerifyErrorKind

Enum VerifyErrorKind 

Source
pub enum VerifyErrorKind {
Show 14 variants InvalidFormat, SignatureInvalid, Expired, IssuerInvalid, AudienceInvalid, MissingClaim(String), KeysetUnavailable, IdTokenAsBearer, IdToken(IdTokenFailureKind), SessionVersionStale, SessionVersionLookupUnavailable, SessionRevoked, SessionLivenessLookupUnavailable, Other,
}
Expand description

Failure classification — mirrors the VerifyError and IdVerifyError surfaces but lives at the audit layer.

Stable, low-cardinality enum suitable for audit-dashboard pivots. MissingClaim carries the claim name as String (~6 well-known claims in production: "aud", "iat", "jti", "sub", "exp", "client_id") — still low-cardinality at the dashboard layer. The String allocation (vs &'static str in VerifyError::MissingClaim) is the cost of full serde round-trip support; per-event overhead is negligible on the rare-failure emission path.

Other is a flat catch-all — engine M-row identifier goes into AuditEvent::metadata under the key "engine_msg" to keep this enum bounded.

── id_token nesting (Phase 10.11.B) ───────────────────────────────────

OIDC-specific failure rows (M66-M73 + M29-mirror) live inside IdTokenFailureKind under a single nested variant IdToken(_). The audit-pivot pattern callers use:

match event.kind {
    VerifyErrorKind::IdToken(_) => bucket_for("id_token failures"),
    VerifyErrorKind::IdTokenAsBearer => bucket_for("M73 misuse"),
    VerifyErrorKind::Expired => bucket_for("token expired"),
    // ...
}

A single IdToken(_) arm filters the entire OIDC failure family — dashboards do not need to enumerate 14 names. Profile-agnostic JOSE failures (Expired, IssuerInvalid, AudienceInvalid, MissingClaim, SignatureInvalid, KeysetUnavailable, InvalidFormat) reuse the existing flat variants — they are shared between access_token and id_token verify surfaces, and forcing consumers to write a 2nd match arm for “id_token expired” distinct from “access_token expired” would noise the call site without changing the operator action (“token expired, refresh”). The audit log distinguishes the two via AuditEvent::source_id composition (compound azp ‖ aud ‖ kid for id_token vs client_id ‖ kid for access).

Variants§

§

InvalidFormat

§

SignatureInvalid

§

Expired

§

IssuerInvalid

§

AudienceInvalid

§

MissingClaim(String)

§

KeysetUnavailable

§

IdTokenAsBearer

§

IdToken(IdTokenFailureKind)

Phase 10.11.B — nested OIDC-specific failure family. See IdTokenFailureKind.

§

SessionVersionStale

Phase 11.Z — token’s sv claim below authoritative substrate (engine check_epoch reject). Distinct from Expired: stale is revocation-driven, expired is exp-bound. Audit dashboards pivot on this kind to surface break-glass propagation lag.

§

SessionVersionLookupUnavailable

Phase 11.Z — engine check_epoch could not reach its substrate (cache miss + fetcher transient). Fail-closed surface; audit dashboards pivot on this kind to surface substrate health problems distinct from cryptographic failure.

§

SessionRevoked

Phase 11.Z 0.10.0 (RFC_2026-05-08 §4.2) — L2 session liveness reject. Token’s sid resolved to a row absent OR with revoked_at set. Distinct from SessionVersionStale (L1): L2 = consumer-DB row revocation; L1 = cross-service break-glass propagation. Pivots help operators distinguish per-session logout traffic from cluster-wide break-glass bumps.

§

SessionLivenessLookupUnavailable

Phase 11.Z 0.10.0 — L2 session liveness substrate unreachable. Fail-closed surface; audit dashboards pivot on this kind to surface consumer-DB substrate health problems distinct from SessionVersionLookupUnavailable (L1 substrate health).

§

Other

Trait Implementations§

Source§

impl Clone for VerifyErrorKind

Source§

fn clone(&self) -> VerifyErrorKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VerifyErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for VerifyErrorKind

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<VerifyErrorKind, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for VerifyErrorKind

Source§

fn eq(&self, other: &VerifyErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for VerifyErrorKind

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for VerifyErrorKind

Source§

impl StructuralPartialEq for VerifyErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,