MessageSignature

Trait MessageSignature 

Source
pub trait MessageSignature {
    type Error;

    // Required methods
    fn has_message_signature(&self) -> bool;
    fn get_key_ids(&self) -> Result<IndexMap<String, 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_key_ids(&self) -> Result<IndexMap<String, 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

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_key_ids(&self) -> HyperSigResult<IndexMap<String, 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_key_ids(&self) -> Result<IndexMap<String, 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§