diff --git a/src/core/lib/JWT.mjs b/src/core/lib/JWT.mjs index 2edd0110..fee7fec5 100644 --- a/src/core/lib/JWT.mjs +++ b/src/core/lib/JWT.mjs @@ -21,4 +21,4 @@ export const JWT_ALGORITHMS = [ "ES384", "ES512", "None" -]; \ No newline at end of file +]; diff --git a/src/core/operations/JWTSign.mjs b/src/core/operations/JWTSign.mjs index 1d220cf8..af46908e 100644 --- a/src/core/operations/JWTSign.mjs +++ b/src/core/operations/JWTSign.mjs @@ -3,11 +3,9 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ - import Operation from "../Operation.mjs"; import jwt from "jsonwebtoken"; import OperationError from "../errors/OperationError.mjs"; - import {JWT_ALGORITHMS} from "../lib/JWT.mjs"; diff --git a/src/core/operations/JWTVerify.mjs b/src/core/operations/JWTVerify.mjs index 9ee90a4a..6d334f5b 100644 --- a/src/core/operations/JWTVerify.mjs +++ b/src/core/operations/JWTVerify.mjs @@ -3,14 +3,12 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ - import Operation from "../Operation.mjs"; import jwt from "jsonwebtoken"; import OperationError from "../errors/OperationError.mjs"; - - import {JWT_ALGORITHMS} from "../lib/JWT.mjs"; + /** * JWT Verify operation */ @@ -46,8 +44,7 @@ class JWTVerify extends Operation { const [key] = args; try { - const verified = jwt.verify(input, key, { algorithms: JWT_ALGORITHMS}); - + const verified = jwt.verify(input, key, { algorithms: JWT_ALGORITHMS }); if (Object.prototype.hasOwnProperty.call(verified, "name") && verified.name === "JsonWebTokenError") { throw new OperationError(verified.message);