Expand description
actix-web inbound-verify glue for SNAP BI service signatures.
Provides verify_request — a single function that takes the parts of an
actix-web request (method, path, headers, body) plus a client secret,
and returns Ok(()) iff the incoming X-SIGNATURE validates against the
canonical SNAP BI service stringToSign.
A full Transform/middleware wrapper is intentionally deferred to a v2.x
release — body extraction inside actix middleware requires
buffer-and-replay plumbing that’s better designed once we have a
production caller. For now, consumers call verify_request from inside
their own handler (or a custom FromRequest extractor) after the body is
materialised.
Functions§
- verify_
request - Verify a SNAP BI service request against
client_secret. ReturnsOk(())whenX-SIGNATUREmatches the canonical stringToSign computed from the supplied method, path, body,X-TIMESTAMPheader, and Bearer access token. Any missing header or signature mismatch yields akamu_snap_crypto::Error.