Skip to main content

MessageSignature

Trait MessageSignature 

Source
pub trait MessageSignature {
    type Error;

    // Required methods
    fn has_message_signature(&self) -> bool;
    fn get_alg_key_ids(
        &self,
    ) -> Result<IndexMap<String, (Option<AlgorithmName>, Option<String>)>, Self::Error>;
    fn get_signature_params(
        &self,
    ) -> Result<IndexMap<String, HttpSignatureParams>, Self::Error>;
}
Expand description

A trait about the http message signature common to both request and response

Required Associated Types§

Required Methods§

Source

fn has_message_signature(&self) -> bool

Check if the request has signature and signature-input headers

Source

fn get_alg_key_ids( &self, ) -> Result<IndexMap<String, (Option<AlgorithmName>, Option<String>)>, Self::Error>

Extract all key ids for signature bases contained in the request headers

Source

fn get_signature_params( &self, ) -> Result<IndexMap<String, HttpSignatureParams>, Self::Error>

Extract all signature params used to generate signature bases contained in the request headers

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<D> MessageSignature for Request<D>
where D: Send + Body + Sync,

Source§

fn has_message_signature(&self) -> bool

Check if the request has signature and signature-input headers

Source§

fn get_alg_key_ids( &self, ) -> HyperSigResult<IndexMap<String, (Option<AlgorithmName>, Option<String>)>>

Extract all signature bases contained in the request headers

Source§

fn get_signature_params( &self, ) -> Result<IndexMap<String, HttpSignatureParams>, Self::Error>

Extract all signature params used to generate signature bases contained in the request headers

Source§

type Error = HyperSigError

Source§

impl<D> MessageSignature for Response<D>
where D: Send + Body + Sync,

Source§

fn has_message_signature(&self) -> bool

Check if the response has signature and signature-input headers

Source§

fn get_alg_key_ids( &self, ) -> Result<IndexMap<String, (Option<AlgorithmName>, Option<String>)>, Self::Error>

Extract all key ids for signature bases contained in the response headers

Source§

fn get_signature_params( &self, ) -> Result<IndexMap<String, HttpSignatureParams>, Self::Error>

Extract all signature params used to generate signature bases contained in the response headers

Source§

type Error = HyperSigError

Implementors§