From de5162e417c14916b6b3f8c9c104d25c07ceef10 Mon Sep 17 00:00:00 2001 From: wukko Date: Mon, 9 Sep 2024 19:39:07 +0600 Subject: [PATCH] api/jwt: remove redundant exports --- api/src/security/jwt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/security/jwt.js b/api/src/security/jwt.js index 251b936a..91d6cf9e 100644 --- a/api/src/security/jwt.js +++ b/api/src/security/jwt.js @@ -11,7 +11,7 @@ const makeHmac = (header, payload) => .update(`${header}.${payload}`) .digest("base64url"); -export const generate = () => { +const generate = () => { const exp = Math.floor(new Date().getTime() / 1000) + env.jwtLifetime; const header = toBase64URL(JSON.stringify({ @@ -32,7 +32,7 @@ export const generate = () => { }; } -export const verify = (jwt) => { +const verify = (jwt) => { const [header, payload, signature] = jwt.split(".", 3); const timestamp = Math.floor(new Date().getTime() / 1000);