From: Justin Wind Date: Sun, 22 Oct 2023 18:54:40 +0000 (-0700) Subject: fix field name inside packed tickets X-Git-Tag: v1.1.0~3 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=baf73afc7f5090dc2bd1d720b5ecbc2b976e414a;p=squeep-indie-auther fix field name inside packed tickets --- 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),