[][src]Trait http_signature_normalization_actix::digest::SignExt

pub trait SignExt: Sign {
    fn authorization_signature_with_digest<F, E, K, D, V>(
        self,
        config: &Config,
        key_id: K,
        digest: &mut D,
        v: V,
        f: F
    ) -> Result<DigestClient<V>, E>
    where
        F: FnOnce(&str) -> Result<String, E>,
        E: From<ToStrError> + From<InvalidHeaderValue>,
        K: Display,
        D: DigestCreate,
        V: AsRef<[u8]>,
        Self: Sized
;
fn signature_with_digest<F, E, K, D, V>(
        self,
        config: &Config,
        key_id: K,
        digest: &mut D,
        v: V,
        f: F
    ) -> Result<DigestClient<V>, E>
    where
        F: FnOnce(&str) -> Result<String, E>,
        E: From<ToStrError> + From<InvalidHeaderValue>,
        K: Display,
        D: DigestCreate,
        V: AsRef<[u8]>,
        Self: Sized
; }

Extend the Sign trait with support for adding Digest Headers to the request

It generates HTTP Signatures after the Digest header has been added, in order to have verification that the body has not been tampered with, or that the request can't be replayed by a malicious entity

Required methods

fn authorization_signature_with_digest<F, E, K, D, V>(
    self,
    config: &Config,
    key_id: K,
    digest: &mut D,
    v: V,
    f: F
) -> Result<DigestClient<V>, E> where
    F: FnOnce(&str) -> Result<String, E>,
    E: From<ToStrError> + From<InvalidHeaderValue>,
    K: Display,
    D: DigestCreate,
    V: AsRef<[u8]>,
    Self: Sized

Set the Digest and Authorization headers on the request

fn signature_with_digest<F, E, K, D, V>(
    self,
    config: &Config,
    key_id: K,
    digest: &mut D,
    v: V,
    f: F
) -> Result<DigestClient<V>, E> where
    F: FnOnce(&str) -> Result<String, E>,
    E: From<ToStrError> + From<InvalidHeaderValue>,
    K: Display,
    D: DigestCreate,
    V: AsRef<[u8]>,
    Self: Sized

Set the Digest and Signature headers on the request

Loading content...

Implementations on Foreign Types

impl SignExt for ClientRequest[src]

Loading content...

Implementors

Loading content...