Trait ssi_claims::ValidateProof

source ·
pub trait ValidateProof<V, T> {
    // Required method
    async fn validate_proof<'a>(
        &'a self,
        verifier: &'a V,
        claims: &'a T,
    ) -> Result<Result<(), InvalidProof>, ProofValidationError>;
}
Expand description

Proof that can be validated against T claims with a verifier of type V.

Required Methods§

source

async fn validate_proof<'a>( &'a self, verifier: &'a V, claims: &'a T, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

Validates the input claim’s proof using the given verifier.

The returned value is a nested Result. The outer Result describes whether or not the proof could be verified. A proof may be valid even if the outer value is Err. The inner Result describes the validity of the proof itself. A proof is surely valid if the inner value is Ok.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'b, V, T> ValidateProof<V, DecodedSigningBytes<'b, T>> for JwsSignature

source§

async fn validate_proof<'a>( &'a self, verifier: &'a V, claims: &'a DecodedSigningBytes<'b, T>, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

source§

impl<P, T> ValidateProof<P, UnsignedCoseSign1<T>> for CoseSignatureBytes

source§

async fn validate_proof<'a>( &'a self, params: &'a P, claims: &'a UnsignedCoseSign1<T>, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

source§

impl<S, T, V> ValidateProof<V, T> for Proof<S>

source§

async fn validate_proof<'a>( &'a self, verifier: &'a V, claims: &'a T, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

source§

impl<S, T, V> ValidateProof<V, T> for Proofs<S>

source§

async fn validate_proof<'a>( &'a self, verifier: &'a V, claims: &'a T, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

source§

impl<V, T, P> ValidateProof<V, T> for Vec<P>
where P: ValidateProof<V, T>,

source§

async fn validate_proof<'a>( &'a self, verifier: &'a V, claims: &'a T, ) -> Result<Result<(), InvalidProof>, ProofValidationError>

Implementors§