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§
Sourcefn has_message_signature(&self) -> bool
fn has_message_signature(&self) -> bool
Check if the request has signature and signature-input headers
Sourcefn get_alg_key_ids(
&self,
) -> Result<IndexMap<String, (Option<AlgorithmName>, Option<String>)>, Self::Error>
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
Sourcefn get_signature_params(
&self,
) -> Result<IndexMap<String, HttpSignatureParams>, Self::Error>
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>
impl<D> MessageSignature for Request<D>
Source§fn has_message_signature(&self) -> bool
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>)>>
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>
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>
impl<D> MessageSignature for Response<D>
Source§fn has_message_signature(&self) -> bool
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>
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>
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