fix field name inside packed tickets
authorJustin Wind <justin.wind+git@gmail.com>
Sun, 22 Oct 2023 18:54:40 +0000 (11:54 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Sun, 22 Oct 2023 18:54:40 +0000 (11:54 -0700)
src/manager.js

index ecec13491dee05fd13b7f32a92129331b4871609..2b64ed16b14f50558b614b2b33afc2ca4f2145e9 100644 (file)
@@ -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),