Liking cljdoc? Tell your friends :D

wagoe.webhooks

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.
raw docstring

signclj

(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).
sourceraw docstring

signature-problemclj

(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).
sourceraw docstring

verify-signatureclj

(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`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close