Skip to content

Commit 13ab032

Browse files
authored
Merge pull request #72 from NillionNetwork/chore/epoch-timestamp
chore!: use epoch timestamp for revoked token timestamp field
2 parents 086c97c + 6a049ac commit 13ab032

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
- "26648:26648" # JSON RPC
1717

1818
nilauth:
19-
image: public.ecr.aws/k5d9x2g2/nilauth:f4f8f682f53356deeec2c0f206b6bd5b98c21095
19+
image: public.ecr.aws/k5d9x2g2/nilauth:a76ec51c4db044a0838d1aa5b15f4143009bd37e
2020
depends_on:
2121
- db
2222
- nilchain

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nillion/nuc",
3-
"version": "0.1.0-rc.7",
3+
"version": "0.1.0-rc.8",
44
"license": "MIT",
55
"repository": "https://github.com/NillionNetwork/nuc-ts",
66
"engines": {

src/nilauth/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ export type CreateTokenResponse = z.infer<typeof CreateTokenResponseSchema>;
8484
export const RevokedTokenSchema = z
8585
.object({
8686
token_hash: z.string(),
87-
revoked_at: z.string(),
87+
revoked_at: z.number(),
8888
})
8989
.transform(({ token_hash, revoked_at }) => ({
9090
tokenHash: token_hash,
91-
revokedAt: revoked_at,
91+
revokedAt: Temporal.Instant.fromEpochMilliseconds(revoked_at * 1000),
9292
}));
9393
export type RevokedToken = z.output<typeof RevokedTokenSchema>;
9494

0 commit comments

Comments
 (0)