Trait SignatureVerifier

Source
pub trait SignatureVerifier: Sync {
    type Output;
    type Error;

    // Required method
    fn check_signature<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        signer_payload: &'life1 SignerPayload,
        signature: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ValidationError<Self::Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

A Verifier can read one or more kinds of signature from an identity assertion, assess the validity of the signature, and return information about the corresponding credential subject.

The associated type Output describes the information which can be derived from the credential and signature.

Required Associated Types§

Source

type Output

The Output type provides credential-type specific information that is derived from the signature. Typically, this describes the named actor, but may also contain information about the time of signing or the credential’s source.

Source

type Error

The Error type provides a credential-specific explanation for why an identity assertion signature could not be accepted. This value may be included in the SignatureError variant of ValidationError.

Required Methods§

Source

fn check_signature<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, signer_payload: &'life1 SignerPayload, signature: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Self::Output, ValidationError<Self::Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Verify the signature, returning an instance of Output if the signature is valid.

Implementors§