Skip to content

Commit

Permalink
1.5.7
Browse files Browse the repository at this point in the history
- iat can be same as nbf
- Added test for iat being same as nbf
  • Loading branch information
miunau committed Mar 7, 2024
1 parent 1699604 commit 97a9ec8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paseto-ts",
"version": "1.5.6",
"version": "1.5.7",
"description": "PASETO v4 (encrypt, decrypt, sign & verify) in TypeScript",
"type": "module",
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions tests/lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ test('parsePayload throws if nbf is before iat', () => {
});
});

test('parsePayload lets a nbf with the same iat through', () => {
assert.ok(() => {
parsePayload({ iat: '2019-01-01T00:00:00Z', nbf: '2019-01-01T00:00:00Z' } as any);
});
});

// jti

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

0 comments on commit 97a9ec8

Please sign in to comment.