From baf73afc7f5090dc2bd1d720b5ecbc2b976e414a Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sun, 22 Oct 2023 11:54:40 -0700 Subject: [PATCH] fix field name inside packed tickets --- src/manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manager.js b/src/manager.js index ecec134..2b64ed1 100644 --- a/src/manager.js +++ b/src/manager.js @@ -1197,7 +1197,7 @@ class Manager { const nowEpoch = common.dateToEpoch(); return this.mysteryBox.pack({ c: common.requestId(), - iss: nowEpoch, + iat: nowEpoch, exp: nowEpoch + ticketLifespanSeconds, sub: subject, res: resource, @@ -1228,7 +1228,7 @@ class Manager { const ticketObj = await this.mysteryBox.unpack(ticket); return { codeId: ticketObj.c, - issued: new Date(ticketObj.iss * 1000), + issued: new Date(ticketObj.iat * 1000), expires: new Date(ticketObj.exp * 1000), subject: new URL(ticketObj.sub), resource: new URL(ticketObj.res), -- 2.45.2