Fixed compilation error

This commit is contained in:
Michael Rowley 2021-12-30 20:36:30 +00:00
parent 0a73825ebe
commit b713be5a9e

View file

@ -49,18 +49,15 @@ class JWTVerify extends Operation {
*/ */
run(input, args) { run(input, args) {
const [key, alg] = args; const [key, alg] = args;
let algos = [];
switch (alg) { switch (alg) {
case "Any": case "Any":
const algos = JWT_ALGORITHMS; algos = JWT_ALGORITHMS;
break; break;
case "None": case "None":
const algos = [ "none" ]; algos.push("none");
default: default:
const algIndex = JWT_ALGORITHMS.indexOf(alg); algos.push(alg);
if (algIndex === -1) {
throw new OperationError("The JWT verification algorithm provided is not supported.");
}
const algos = JWT_ALGORITHMS[];
break; break;
} }