Accept leeway while checking expiration
See original GitHub issueIn some use cases it would be beneficial to allow for a small leeway when checking whether a token has expired, to account for clock differences in client and server machines.
Simple&dirty way could be to overload decode
method.
Nicer way would be to extend Verifier with optional leeway
parameter in seconds and to use this parameter in the Decoder
and to move expiration responsibility to Decoder
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Frequently Asked Questions - Lee County Southwest Florida
LeeWay will send an email notification to accounts with a valid email address on file when your prepaid account has: Reached a low...
Read more >JWT token expiration check - java - Stack Overflow
It seems good. JWT.require(xxx).acceptExpiresAt(5 * 60) means you will accept a token which has already expired 5 minutes before.
Read more >Usage Examples — PyJWT 2.6.0 documentation
The “exp” (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. The processing...
Read more >Getting JWT Expired errors out of nowhere - Jira Cloud
In fact this error even happens when the customer opens our app page in ... @emre.toptanci the code that checks the expiration time...
Read more >13 Foods You Should Never Eat Past the Expiration Date
Soft cheeses Jarred condiments Potato salad Cold-pressed juice Fresh meat Ground meats Deli meat Fish Fresh berries Leafy greens Sprouts
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is available in version 3.6.0. Use
withClockSkew
on the JWT Decoder, defaults to0
.This is a good idea. I know most SAML libraries have a default skew of a few minutes that can be configured. Coming soon.