Skip to content

Commit

Permalink
v2.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasroussel committed Dec 29, 2023
1 parent 7144f16 commit 1c9b415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dart_jsonwebtoken
description: A dart implementation of the famous javascript library 'jsonwebtoken' (JWT).
version: 2.12.1
version: 2.12.2
repository: https://github.com/jonasroussel/dart_jsonwebtoken
homepage: https://github.com/jonasroussel/dart_jsonwebtoken#readme

Expand Down
7 changes: 5 additions & 2 deletions test/header_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ void main() {
});

test('should be still valid', () {
final iat = DateTime(2023);
final exp = DateTime(2023).add(Duration(hours: 1));

withClock(
Clock.fixed(DateTime(2023)),
() {
Expand All @@ -37,8 +40,8 @@ void main() {
JWT.verify(token, hsKey).payload,
equals({
'foo': 'bar',
'iat': DateTime(2023).millisecondsSinceEpoch ~/ 1000,
'exp': DateTime(2023).add(Duration(hours: 1)).millisecondsSinceEpoch ~/ 1000,
'iat': iat.millisecondsSinceEpoch ~/ 1000,
'exp': exp.millisecondsSinceEpoch ~/ 1000,
}),
);
});
Expand Down

0 comments on commit 1c9b415

Please sign in to comment.