|
AXIAM C++ SDK 1.0.0-alpha8
Authentication, authorization, JWKS & route guards (REST + mTLS)
|
Classes | |
| struct | Event |
| A verified delivery. More... | |
| struct | Options |
| Optional inputs to verify(). More... | |
| struct | Result |
| Outcome of verify(). Contextually convertible to bool; falsy means rejected. More... | |
| class | VerifyException |
| Thrown by verify_or_throw() when a delivery does not verify. More... | |
Enumerations | |
| enum class | VerifyError { kNone = 0 , kEmptySecret , kMalformedHeader , kMissingSignature , kMalformedTimestamp , kTimestampHeaderMismatch , kSignatureMismatch , kTimestampOutOfTolerance } |
| Why verification failed. More... | |
Functions | |
| const char * | to_string (VerifyError error) noexcept |
| Stable, secret-free description of a VerifyError. | |
| Result | verify (const Sensitive< std::string > &secret, const std::string &signature_header, const std::string &body, const Options &options=Options{}) |
| Verify a webhook delivery. | |
| Result | verify (const std::string &secret, const std::string &signature_header, const std::string &body, const Options &options=Options{}) |
| Overload for a secret that is not already wrapped. Prefer the Sensitive form. | |
| Event | verify_or_throw (const Sensitive< std::string > &secret, const std::string &signature_header, const std::string &body, const Options &options=Options{}) |
| Throwing twin of verify(), for handlers that prefer an exception. | |
|
strong |
Why verification failed.
Deliberately coarse: nothing here, and nothing in the matching message, discloses the expected signature.
|
noexcept |
Stable, secret-free description of a VerifyError.
| Result axiam::webhook::verify | ( | const Sensitive< std::string > & | secret, |
| const std::string & | signature_header, | ||
| const std::string & | body, | ||
| const Options & | options = Options{} |
||
| ) |
Verify a webhook delivery.
Never throws; fails closed on anything unexpected.
| secret | the webhook's plaintext secret (§7 Sensitive). |
| signature_header | the raw X-Axiam-Signature value. |
| body | the RAW request body bytes, exactly as received. |
| options | freshness window, clock seam, optional headers. |
| Result axiam::webhook::verify | ( | const std::string & | secret, |
| const std::string & | signature_header, | ||
| const std::string & | body, | ||
| const Options & | options = Options{} |
||
| ) |
Overload for a secret that is not already wrapped. Prefer the Sensitive form.
| Event axiam::webhook::verify_or_throw | ( | const Sensitive< std::string > & | secret, |
| const std::string & | signature_header, | ||
| const std::string & | body, | ||
| const Options & | options = Options{} |
||
| ) |
Throwing twin of verify(), for handlers that prefer an exception.
| VerifyException | — the message names the failure class only, never the expected signature. |