pub enum CredentialVerdict {
Valid {
issuer: IdentityDID,
subject: CanonicalDid,
caps: Vec<Capability>,
as_of: u128,
},
SaidMismatch,
SchemaInvalid,
IssuerSignatureInvalid,
RegistryNotEstablished,
CredentialRevoked {
revoked_at: u128,
},
Expired {
expired_at: DateTime<Utc>,
now: DateTime<Utc>,
},
WitnessQuorumNotMet {
event: LifecycleEvent,
collected: usize,
required: usize,
},
IssuerKelDuplicitous,
}Expand description
The distinguishable outcome of verify_credential.
Every failure is a named variant so a consumer can explain why a credential did not verify, never a generic “invalid”.
Variants§
Valid
The credential is authentic, anchored, witnessed (per policy), unexpired, and not revoked at/before the presentation position.
Fields
issuer: IdentityDIDIssuer AID (did:keri:), parsed once at construction.
subject: CanonicalDidSubject (holder) AID (did:keri:), parsed once at construction.
caps: Vec<Capability>The capabilities the credential grants (a.capability), parsed once — a
capability that does not parse fails the verdict closed (never silently dropped).
SaidMismatch
The recomputed ACDC d (or nested a.d) did not match the embedded SAID.
SchemaInvalid
The attributes failed validation against the embedded capability schema, or
the schema SAID s is not the pinned one.
IssuerSignatureInvalid
The issuance was not anchored, or its issuer signature did not verify against the signing-time key.
RegistryNotEstablished
The registry (vcp) was never anchored in the issuer KEL, so status is unknown.
CredentialRevoked
A revocation reached the policy bar and is anchored at/before the presentation.
Expired
The credential expired at expired_at, checked against the injected now.
Fields
WitnessQuorumNotMet
Under VerifierWitnessPolicy::RequireWitnesses a lifecycle anchor did not
reach witness quorum (fail-closed). Names which anchor missed.
Fields
event: LifecycleEventWhich lifecycle anchor (vcp/iss/rev) missed quorum.
IssuerKelDuplicitous
The issuer KEL forks (two events at one seq with different SAIDs) — fail-closed in both witness policies.
Implementations§
Trait Implementations§
Source§impl Clone for CredentialVerdict
impl Clone for CredentialVerdict
Source§fn clone(&self) -> CredentialVerdict
fn clone(&self) -> CredentialVerdict
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 CredentialVerdict
impl Debug for CredentialVerdict
impl Eq for CredentialVerdict
Source§impl PartialEq for CredentialVerdict
impl PartialEq for CredentialVerdict
Source§fn eq(&self, other: &CredentialVerdict) -> bool
fn eq(&self, other: &CredentialVerdict) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CredentialVerdict
Auto Trait Implementations§
impl Freeze for CredentialVerdict
impl RefUnwindSafe for CredentialVerdict
impl Send for CredentialVerdict
impl Sync for CredentialVerdict
impl Unpin for CredentialVerdict
impl UnsafeUnpin for CredentialVerdict
impl UnwindSafe for CredentialVerdict
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.