@octokit/webhooks
Version:
GitHub webhook events toolset for Node.js
6 lines (5 loc) • 316 B
JavaScript
import { verify as verifyMethod } from "@octokit/webhooks-methods";
import { toNormalizedJsonString } from "./to-normalized-json-string";
export async function verify(secret, payload, signature) {
return verifyMethod(secret, typeof payload === "string" ? payload : toNormalizedJsonString(payload), signature);
}