Trait httpsig_hyper::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

§

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

§

type Error = HyperSigError

Implementors§