pub trait SignExt: Sign {
    // Required methods
    fn authorization_signature_with_digest<F, E, K, S, D, V>(
        self,
        config: Config<S>,
        key_id: K,
        digest: D,
        v: V,
        f: F,
    ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
       where F: FnOnce(&str) -> Result<String, E> + Send + 'static,
             E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static,
             K: Display + 'static,
             S: Spawn + 'static,
             D: DigestCreate + Send + 'static,
             V: AsRef<[u8]> + Send + 'static,
             Self: Sized;
    fn signature_with_digest<F, E, K, S, D, V>(
        self,
        config: Config<S>,
        key_id: K,
        digest: D,
        v: V,
        f: F,
    ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
       where F: FnOnce(&str) -> Result<String, E> + Send + 'static,
             E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static,
             K: Display + 'static,
             S: Spawn + 'static,
             D: DigestCreate + Send + 'static,
             V: AsRef<[u8]> + Send + 'static,
             Self: Sized;
}
Expand description

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§

Source

fn authorization_signature_with_digest<F, E, K, S, D, V>( self, config: Config<S>, key_id: K, digest: D, v: V, f: F, ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
where F: FnOnce(&str) -> Result<String, E> + Send + 'static, E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static, K: Display + 'static, S: Spawn + 'static, D: DigestCreate + Send + 'static, V: AsRef<[u8]> + Send + 'static, Self: Sized,

Set the Digest and Authorization headers on the request

Source

fn signature_with_digest<F, E, K, S, D, V>( self, config: Config<S>, key_id: K, digest: D, v: V, f: F, ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
where F: FnOnce(&str) -> Result<String, E> + Send + 'static, E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static, K: Display + 'static, S: Spawn + 'static, D: DigestCreate + Send + 'static, V: AsRef<[u8]> + Send + 'static, Self: Sized,

Set the Digest and Signature headers on the request

Implementations on Foreign Types§

Source§

impl SignExt for ClientRequest

Source§

fn authorization_signature_with_digest<F, E, K, S, D, V>( self, config: Config<S>, key_id: K, digest: D, v: V, f: F, ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
where F: FnOnce(&str) -> Result<String, E> + Send + 'static, E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static, K: Display + 'static, S: Spawn + 'static, D: DigestCreate + Send + 'static, V: AsRef<[u8]> + Send + 'static, Self: Sized,

Source§

fn signature_with_digest<F, E, K, S, D, V>( self, config: Config<S>, key_id: K, digest: D, v: V, f: F, ) -> Pin<Box<dyn Future<Output = Result<DigestClient<V>, E>>>>
where F: FnOnce(&str) -> Result<String, E> + Send + 'static, E: From<JoinError> + From<PrepareSignError> + From<Canceled> + From<InvalidHeaderValue> + Debug + Send + 'static, K: Display + 'static, S: Spawn + 'static, D: DigestCreate + Send + 'static, V: AsRef<[u8]> + Send + 'static, Self: Sized,

Implementors§