From 6135dd134f95828b65ab98b4e73148f3662c1e16 Mon Sep 17 00:00:00 2001 From: Nikos Triantafyllou Date: Fri, 13 Sep 2024 18:05:58 +0300 Subject: [PATCH] change cred expiration date --- routes/routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/routes.js b/routes/routes.js index 219e97a..4a28652 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -443,7 +443,7 @@ router.post("/credential", async (req, res) => { iss: serverURL, sub: decodedHeaderSubjectDID || "", iat: Math.floor(Date.now() / 1000), // Token issued at time - exp: (Math.floor(Date.now() / 1000) + 60 * 60) * 1000, + exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 30, // Token expiration time (1 hour from now) jti: "urn:did:1904a925-38bd-4eda-b682-4b5e3ca9d4bc", vc: { type: ["StudentID"],//["EducationalID"], @@ -475,7 +475,7 @@ router.post("/credential", async (req, res) => { Math.floor(Date.now() / 1000) * 1000 ).toISOString(), expirationDate: new Date( - (Math.floor(Date.now() / 1000) + 60 * 60) * 1000 + (Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 30) * 1000 ).toISOString(), validFrom: new Date( Math.floor(Date.now() / 1000) * 1000