mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 07:45:00 -04:00
Fixed compilation error
This commit is contained in:
parent
0a73825ebe
commit
b713be5a9e
1 changed files with 4 additions and 7 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue