-
-
Notifications
You must be signed in to change notification settings - Fork 244
Implement the ability to define a leeway when validating JWT tokens. #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello @otetard! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on January 03, 2019 at 10:56 Hours UTC |
ce04678
to
4ff8ce4
Compare
This commit looks good, thanks for making it! I added a few minor nit picks in the code, if you don't mind taking a look at those. Could you also add that new option to the documentation here: https://github.com/vimalloc/flask-jwt-extended/blob/master/docs/options.rst Thanks! |
4ff8ce4
to
b4dd52d
Compare
Thanks @vimalloc for your review! I’ve updated my PR to take your comments into account. |
PyJWT library implement a way to define a “leeway” for time validations. > PyJWT also supports the leeway part of the expiration time > definition, which means you can validate a expiration time which is > in the past but not very far. For example, if you have a JWT payload > with a expiration time set to 30 seconds after creation but you know > that sometimes you will process it after 30 seconds, you can set a > leeway of 10 seconds in order to have some margin: > > https://github.com/jpadilla/pyjwt/blob/master/docs/usage.rst This is implemented as an optional configuration setting, `JWT_DECODE_LEEWAY`.
b4dd52d
to
7617540
Compare
I released this in version 3.15.0, it should be showing up on pypi soon. Thanks for contributing! 👍 |
PyJWT library implement a way to define a “leeway” for time
validations.
This is implemented as an optional configuration setting,
JWT_DECODE_LEEWAY
.