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)
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.
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.
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
impl Clone for VerifyErrorKind
Source§fn clone(&self) -> VerifyErrorKind
fn clone(&self) -> VerifyErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifyErrorKind
impl Debug for VerifyErrorKind
Source§impl<'de> Deserialize<'de> for VerifyErrorKind
impl<'de> Deserialize<'de> for VerifyErrorKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerifyErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerifyErrorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VerifyErrorKind
impl PartialEq for VerifyErrorKind
Source§fn eq(&self, other: &VerifyErrorKind) -> bool
fn eq(&self, other: &VerifyErrorKind) -> bool
self and other values to be equal, and is used by ==.