#[non_exhaustive]
pub struct PresentationValidator;
Expand description

A struct for validating Presentations.

Implementations

Validate a Presentation.

The following properties are validated according to options:

  • the semantic structure of the presentation,
  • the holder’s signature,
  • the relationship between the holder and the credential subjects,
  • the signatures and some properties of the constituent credentials (see CredentialValidator::validate).
Warning

The lack of an error returned from this method is in of itself not enough to conclude that the presentation can be trusted. This section contains more information on additional checks that should be carried out before and after calling this method.

The state of the supplied DID Documents.

The caller must ensure that the DID Documents in holder and issuers are up-to-date. The convenience methods Resolver::resolve_presentation_holder and Resolver::resolve_presentation_issuers can help extract the latest available states of these DID Documents.

Properties that are not validated

There are many properties defined in The Verifiable Credentials Data Model that are not validated, such as: credentialStatus, type, credentialSchema, refreshService, and more. These should be manually checked after validation, according to your requirements.

Errors

An error is returned whenever a validated condition is not satisfied.

Verify the presentation’s signature using the resolved document of the holder.

Warning

The caller must ensure that the DID Document of the holder is up-to-date.

Errors

Fails if the holder does not match the presentation’s holder property. Fails if signature verification against the holder document fails.

Validates the semantic structure of the Presentation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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