pub trait RequestMessageSignature {
type Error;
// Required methods
fn set_message_signature<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 mut self,
signature_params: &'life1 HttpSignatureParams,
signing_key: &'life2 T,
signature_name: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: SigningKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn verify_message_signature<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
verifying_key: &'life1 T,
key_id: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: VerifyingKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn has_message_signature(&self) -> bool;
}Expand description
A trait to set the http message signature from given http signature params
Required Associated Types§
Required Methods§
sourcefn set_message_signature<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 mut self,
signature_params: &'life1 HttpSignatureParams,
signing_key: &'life2 T,
signature_name: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: SigningKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_message_signature<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 mut self,
signature_params: &'life1 HttpSignatureParams,
signing_key: &'life2 T,
signature_name: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: SigningKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Set the http message signature from given http signature params and signing key
sourcefn verify_message_signature<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
verifying_key: &'life1 T,
key_id: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: VerifyingKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_message_signature<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
verifying_key: &'life1 T,
key_id: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: VerifyingKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify the http message signature with given verifying key if the request has signature and signature-input headers
sourcefn has_message_signature(&self) -> bool
fn has_message_signature(&self) -> bool
Check if the request has signature and signature-input headers
Implementations on Foreign Types§
source§impl<D> RequestMessageSignature for Request<D>
impl<D> RequestMessageSignature for Request<D>
source§fn set_message_signature<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 mut self,
signature_params: &'life1 HttpSignatureParams,
signing_key: &'life2 T,
signature_name: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: SigningKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_message_signature<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 mut self,
signature_params: &'life1 HttpSignatureParams,
signing_key: &'life2 T,
signature_name: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: SigningKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Set the http message signature from given http signature params and signing key
source§fn verify_message_signature<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
verifying_key: &'life1 T,
key_id: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: VerifyingKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_message_signature<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
verifying_key: &'life1 T,
key_id: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: VerifyingKey + Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify the http message signature with given verifying key if the request has signature and signature-input headers Return true if the signature is valid, false if invalid for the given key, and error if the request does not have signature and/or signature-input headers If key_id is given, it is used to match the key id in signature params
source§fn has_message_signature(&self) -> bool
fn has_message_signature(&self) -> bool
Check if the request has signature and signature-input headers