Skip to content

Commit 97a9ec8

Browse files
committedMar 7, 2024·
1.5.7
- iat can be same as nbf - Added test for iat being same as nbf
1 parent 1699604 commit 97a9ec8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "paseto-ts",
3-
"version": "1.5.6",
3+
"version": "1.5.7",
44
"description": "PASETO v4 (encrypt, decrypt, sign & verify) in TypeScript",
55
"type": "module",
66
"keywords": [

‎tests/lib/parse.ts

+6
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ test('parsePayload throws if nbf is before iat', () => {
260260
});
261261
});
262262

263+
test('parsePayload lets a nbf with the same iat through', () => {
264+
assert.ok(() => {
265+
parsePayload({ iat: '2019-01-01T00:00:00Z', nbf: '2019-01-01T00:00:00Z' } as any);
266+
});
267+
});
268+
263269
// jti
264270

265271
test('it throws if jti claim is not a string', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.