pub enum PresentationVerdict {
Valid {
issuer: IdentityDID,
subject: CanonicalDid,
caps: Vec<Capability>,
role: Option<String>,
expires_at: Option<DateTime<Utc>>,
},
HolderNotCurrentKey,
WrongAudience,
NonceMismatchOrConsumed,
Expired,
SubjectKelInvalid,
CredentialNotValid(CredentialVerdict),
}Expand description
The distinguishable outcome of verify_presentation.
Every failure names why the presentation was not honored. A possessed credential
alone never yields PresentationVerdict::Valid; current-control proof is mandatory.
Variants§
Valid
Holder-binding proven: the credential is valid (F.5) AND the presentation was signed by the subject AID’s current signing-time key for the expected audience and nonce/TTL. Carries the grant facts so the F.6 authority bridge can build a policy context from the verified presentation, never from a raw ACDC.
Fields
issuer: IdentityDIDThe issuer AID (did:keri:) that granted the now-bound credential.
subject: CanonicalDidThe subject (holder) AID (did:keri:) whose current key signed the presentation.
caps: Vec<Capability>The capabilities the now-bound credential grants (a.capability).
HolderNotCurrentKey
The presentation signature did not verify against the subject KEL’s current key —
the presenter does not currently control a.i (bearer / stale-key rejection).
WrongAudience
The presentation was bound to a different audience than expected.
NonceMismatchOrConsumed
Challenge path: the presented nonce did not match the verifier’s challenge, or the challenge was already consumed (single-use replay protection).
Expired
TTL path: the non-interactive presentation’s not_after has passed (now >= not_after).
SubjectKelInvalid
The subject’s KEL could not be replayed (missing/forked/invalid) — no current key to bind against.
CredentialNotValid(CredentialVerdict)
The credential itself is not valid (chains F.5): revoked, expired, unanchored, schema/SAID mismatch, etc. A presentation of an invalid credential binds nothing.
Implementations§
Source§impl PresentationVerdict
impl PresentationVerdict
Sourcepub fn is_honored(&self) -> bool
pub fn is_honored(&self) -> bool
Whether the presentation is honored (Valid).
Trait Implementations§
Source§impl Clone for PresentationVerdict
impl Clone for PresentationVerdict
Source§fn clone(&self) -> PresentationVerdict
fn clone(&self) -> PresentationVerdict
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 PresentationVerdict
impl Debug for PresentationVerdict
impl Eq for PresentationVerdict
Source§impl PartialEq for PresentationVerdict
impl PartialEq for PresentationVerdict
Source§fn eq(&self, other: &PresentationVerdict) -> bool
fn eq(&self, other: &PresentationVerdict) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PresentationVerdict
Auto Trait Implementations§
impl Freeze for PresentationVerdict
impl RefUnwindSafe for PresentationVerdict
impl Send for PresentationVerdict
impl Sync for PresentationVerdict
impl Unpin for PresentationVerdict
impl UnsafeUnpin for PresentationVerdict
impl UnwindSafe for PresentationVerdict
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.