verify-trello-webhook
v1.0.0
Published
Safely verify that a received webhook originated from Trello.
Downloads
2
Maintainers
Readme
verify-trello-webhook
Safely verify that a received webhook originated from Trello.
Uses crypto.timingSafeEqual(), so Node.js v6.6.0 (or newer) is required.
Installation
Install the package with NPM:
$ npm install verify-trello-webhook
Usage
Example:
import verifyTrelloWebhook from "verify-trello-webhook";
let signature = "LeCJzA5aHiwh4zcxLhY25TJSNg=";
let payload = JSON.stringify({ hello: "world" });
let secret = "secret";
let callbackUrl = "https://example.com/webhooks";
verifyTrelloWebhook(signature, payload, secret, callbackUrl); // Returns true if verification succeeds; otherwise, false.
Related
You may also be interested in verify-github-webhook, a similar package for GitHub webhook verification.