pub struct HttpSignatureBase { /* private fields */ }Expand description
Signature Base https://datatracker.ietf.org/doc/html/rfc9421#section-2.5
Implementations§
Source§impl HttpSignatureBase
impl HttpSignatureBase
Sourcepub fn try_new(
component_lines: &[HttpMessageComponent],
signature_params: &HttpSignatureParams,
) -> Result<HttpSignatureBase, HttpSigError>
pub fn try_new( component_lines: &[HttpMessageComponent], signature_params: &HttpSignatureParams, ) -> Result<HttpSignatureBase, HttpSigError>
Creates a new signature base from component lines and signature params This should not be exposed to user and not used directly. Use wrapper functions generating SignatureBase from base HTTP request and Signer itself instead when newly generating signature When verifying signature, use wrapper functions generating SignatureBase from HTTP request containing signature params itself instead.
Sourcepub fn build_raw_signature(
&self,
signing_key: &impl SigningKey,
) -> Result<Vec<u8>, HttpSigError>
pub fn build_raw_signature( &self, signing_key: &impl SigningKey, ) -> Result<Vec<u8>, HttpSigError>
Build signature from given signing key
Sourcepub fn build_signature_headers(
&self,
signing_key: &impl SigningKey,
signature_name: Option<&str>,
) -> Result<HttpSignatureHeaders, HttpSigError>
pub fn build_signature_headers( &self, signing_key: &impl SigningKey, signature_name: Option<&str>, ) -> Result<HttpSignatureHeaders, HttpSigError>
Build the signature and signature-input headers structs
Sourcepub fn verify_signature_headers(
&self,
verifying_key: &impl VerifyingKey,
signature_headers: &HttpSignatureHeaders,
) -> Result<(), HttpSigError>
pub fn verify_signature_headers( &self, verifying_key: &impl VerifyingKey, signature_headers: &HttpSignatureHeaders, ) -> Result<(), HttpSigError>
Verify the signature using the given verifying key
Sourcepub fn covered_components(&self) -> &[HttpMessageComponentId]
pub fn covered_components(&self) -> &[HttpMessageComponentId]
Get covered components from signature params
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpSignatureBase
impl RefUnwindSafe for HttpSignatureBase
impl Send for HttpSignatureBase
impl Sync for HttpSignatureBase
impl Unpin for HttpSignatureBase
impl UnwindSafe for HttpSignatureBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more