Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication primitives and the RequestSigner hook.

ApiKey wraps a secret with a redacting Debug impl. The RequestSigner trait is the extension point: every outbound request is handed to a signer just before transmission. Default behavior is ApiKeySigner (adds x-api-key); behind the bedrock feature, BedrockSigner signs requests with AWS sigv4. A custom signer can be installed via ClientBuilder::signer.

Structs§

ApiKey
Anthropic API key.
ApiKeySignerasync
Default signer: adds the x-api-key header from the wrapped key.

Traits§

RequestSignerasync
Hook called for every outbound HTTP request just before transmission.

Type Aliases§

SignerResult
Result alias for RequestSigner::sign. Boxed errors so signer implementations can use any error type that satisfies the bound.