Implement tests, fix options argument

This commit is contained in:
GCHQ 77703 2018-08-29 22:43:10 +01:00
parent 8559f5c8ea
commit a95f43aa4d
6 changed files with 314 additions and 44 deletions

View file

@ -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;
}