Upgrade octokit to v4.1.2
This commit is contained in:
parent
dbbcbe019d
commit
c1745a9831
1214 changed files with 160765 additions and 0 deletions
22
node_modules/@octokit/webhooks-methods/dist-src/index.js
generated
vendored
Normal file
22
node_modules/@octokit/webhooks-methods/dist-src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { sign } from "./node/sign.js";
|
||||
import { verify } from "./node/verify.js";
|
||||
async function verifyWithFallback(secret, payload, signature, additionalSecrets) {
|
||||
const firstPass = await verify(secret, payload, signature);
|
||||
if (firstPass) {
|
||||
return true;
|
||||
}
|
||||
if (additionalSecrets !== void 0) {
|
||||
for (const s of additionalSecrets) {
|
||||
const v = await verify(s, payload, signature);
|
||||
if (v) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export {
|
||||
sign,
|
||||
verify,
|
||||
verifyWithFallback
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue