Skip to main content

RequestSigner

Trait RequestSigner 

Source
pub trait RequestSigner:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn sign(&self, request: &mut Request) -> SignerResult;
}
Available on crate feature async only.
Expand description

Hook called for every outbound HTTP request just before transmission.

Implementations install request-level authentication: the default ApiKeySigner adds x-api-key, the optional BedrockSigner adds AWS sigv4 signing headers. Install a custom signer via ClientBuilder::signer.

Signers run after per-request beta headers are merged but before the request is sent, so the canonical body and headers are visible for hashing.

Required Methods§

Source

fn sign(&self, request: &mut Request) -> SignerResult

Sign request in place. Return an error to abort the request before it is sent; the error is wrapped in Error::Signing.

Implementors§

Source§

impl RequestSigner for BedrockSigner

Available on crate feature bedrock only.
Source§

impl RequestSigner for ApiKeySigner