-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
session: Check expiration regardless of lifetime field availability
Previously, any token w/o lifetime field was always considered as invalid (expired in particular). In the protocol, the lifetime field's absence is equivalent to all zero claims. Thus, `InvalidAt` and `ExpiredAt` methods behaved correctly for all cases except default one. At the same time, if user explicitly set all lifetime claims to zero - token was not invalid at the epoch #0. From now skipping a lifetime field in a token message is equivalent to a field with all zeros. This change will only affect epoch #0 and will be invisible in practice since the NeoFS network starts from epoch #1. In addition, the internal structure of the type has been simplified. Signed-off-by: Leonard Lyubich <[email protected]>
- Loading branch information
1 parent
2a68580
commit f17fc15
Showing
4 changed files
with
18 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters