Skip to main content

verify

Function verify 

Source
pub fn verify<B, F>(req: &Request<B>, resolve_key: F) -> Result<Verified, Error>
where F: FnMut(&str) -> Result<VerifyingKey, Error>,
Expand description

Verifies a signed HTTP request, autodetecting the signature flavour.

If the request carries a Signature-Input: header the RFC 9421 verifier is used; otherwise the Cavage draft-12 verifier is tried. The resolver is called with the signer’s keyId to fetch a VerifyingKey.

§Errors

Propagates every error surface of the two underlying verifiers. Error::MissingHeader is returned when neither Signature-Input: nor Signature: is present.