Skip to main content

Module httpsig

Module httpsig 

Source
Expand description

RFC 9421 HTTP Message Signatures under the AAuth profile (AAuth §HTTP Message Signatures), with the signer’s key named in Signature-Key (draft-hardt-httpbis-signature-key).

sign covers @method, @authority, @path, @query when there is one, signature-key, and for a request with a body content-digest and content-type. verify checks a signature and hands back the key that made it; a token in a jwt scheme is decoded but NOT verified — that is crate::token::verify_token’s job, against its issuer’s keys.

Structs§

Incoming
A signed request as it arrived.
Outgoing
A request to sign, as its recipient will see it.
Verified
A signature that verified.
VerifyOptions
How verify judges a signature. The default is now, a 60-second window either way, and Ed25519 or ES256.

Enums§

SignatureKey
How the verifier finds the signer’s key: the Signature-Key scheme.
Signer
What signed a request.

Constants§

LABEL
The label this crate signs under.
SIGNATURE_HEADERS
Request headers a signer sets, which a proxy signing on someone’s behalf should strip from what it was handed.

Functions§

content_digest
sha-256=:…:, the RFC 9530 Content-Digest of body.
header_map
The headers sign returns, as a HeaderMap to send.
sign
The headers that sign request with key, presenting signature_key.
sign_jwt
sign presenting token under the jwt scheme: how an agent signs.
verify
Verify request’s signature. resolver is consulted only for the jwks_uri scheme.