WebFlight / JWT

Mendix JWT module
Apache License 2.0
0 stars 4 forks source link

Feature request: tolerance for time differences #15

Closed johanflikweert closed 2 years ago

johanflikweert commented 2 years ago

In our project we receive tokens which have a nbf (not valid before) timestamp which lies a little bit in the future compared with the server time. Sometimes this rounds off to just the second in the future, which makes the token strictly seen invalid. Could a time tolerance be build in such that both nbf and exp timestamps are not handled so strict? Or do you think we should really synchronize our server time better?

mennodehaas commented 2 years ago

Hi @johanflikweert, thanks for your feedback! Small differences in server time can indeed occur. You can use the leeway parameter to allow for a time tolerance. Did you try that one?

johanflikweert commented 2 years ago

Hi Menno, Thanks for your quick reply. Sorry I did not read the release notes well enough. We were able to implement the leeway parameter in the project like you did (had to do it manually, as we are still in Mendix 7) and this solved the problem. Thanks!