Revert "Updated jsonwebtoken dependency to 9+"

This commit is contained in:
a3957273 2024-04-02 18:09:48 +01:00 committed by GitHub
parent 944810614a
commit 99efcb521d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 40 deletions

View file

@ -50,12 +50,7 @@ class JWTSign extends Operation {
try {
return jwt.sign(input, key, {
algorithm: algorithm === "None" ? "none" : algorithm,
// To utilize jsonwebtoken 9+ library and maintain backwards compatibility for regression tests
// This could be turned into operation args in a future PR
allowInsecureKeySizes: true,
allowInvalidAsymmetricKeyTypes: true
algorithm: algorithm === "None" ? "none" : algorithm
});
} catch (err) {
throw new OperationError(`Error: Have you entered the key correctly? The key should be either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.