mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
Implement tests, fix options argument
This commit is contained in:
parent
8559f5c8ea
commit
a95f43aa4d
6 changed files with 314 additions and 44 deletions
|
@ -27,7 +27,7 @@ class JWTVerify extends Operation {
|
|||
this.args = [
|
||||
{
|
||||
name: "Private / Secret Key",
|
||||
type: "shortString",
|
||||
type: "text",
|
||||
value: "secret_cat"
|
||||
},
|
||||
];
|
||||
|
@ -42,7 +42,12 @@ class JWTVerify extends Operation {
|
|||
const [key] = args;
|
||||
|
||||
try {
|
||||
return jwt.verify(input, key);
|
||||
return jwt.verify(input, key, { algorithms: [
|
||||
"HS256",
|
||||
"HS384",
|
||||
"HS512",
|
||||
"none"
|
||||
]});
|
||||
} catch (err) {
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue