What a receiver needs to check a Wagoe webhook, with no other part of the library loaded.
(webhooks/verify-signature secret raw-body (get-in request [:headers "wagoe-signature"]))
Verify against the raw body, before parsing it: re-serialised JSON is not
the bytes that were signed. Use the Wagoe-Event-Id header to drop
deliveries already handled — a retry after a lost response sends the same
event again.
What a receiver needs to check a Wagoe webhook, with no other part of the
library loaded.
(webhooks/verify-signature secret raw-body
(get-in request [:headers "wagoe-signature"]))
Verify against the raw body, before parsing it: re-serialised JSON is not
the bytes that were signed. Use the `Wagoe-Event-Id` header to drop
deliveries already handled — a retry after a lost response sends the same
event again.(sign secret body)(sign secret body timestamp)The Wagoe-Signature header value for body under secret, now or at
timestamp (unix seconds).
The `Wagoe-Signature` header value for `body` under `secret`, now or at `timestamp` (unix seconds).
(signature-problem secret body header)(signature-problem secret body header {:keys [now] :as opts})Why header does not authenticate body, or nil: :malformed, :stale
or :mismatch. opts: :tolerance-s (default 300), :now (unix seconds).
Why `header` does not authenticate `body`, or nil: `:malformed`, `:stale` or `:mismatch`. `opts`: `:tolerance-s` (default 300), `:now` (unix seconds).
(verify-signature secret body header)(verify-signature secret body header opts)True when header is a valid, fresh signature of body under secret.
True when `header` is a valid, fresh signature of `body` under `secret`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |