Skip to content

Conversation

@abathur
Copy link
Contributor

@abathur abathur commented Mar 1, 2019

Instead of requiring JWT_ACCESS_TOKEN_EXPIRES and JWT_REFRESH_TOKEN_EXPIRES to
be of type datetime.timedelta or False, checks in config.py support any
value that can be successfully added to a datetime.datetime object.

Closes #214.

(I'm not well-configured to test this atm, so I'm relying on CI to slap me down if there's a problem here.)

Edit: I didn't notice #226 and stomped all over it; going to close, revise, and resub

Instead of requiring JWT_ACCESS_TOKEN_EXPIRES and JWT_REFRESH_TOKEN_EXPIRES to
be of type `datetime.timedelta` or `False`, checks in config.py support any
value that can be successfully added to a `datetime.datetime` object.
@pep8speaks
Copy link

Hello @abathur! Thanks for submitting the PR.

Line 207:18: E712 comparison to False should be 'if cond is not False:' or 'if cond:'
Line 220:18: E712 comparison to False should be 'if cond is not False:' or 'if cond:'

@abathur abathur closed this Mar 1, 2019
@abathur abathur deleted the ducktype_expires branch March 1, 2019 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

relax datetime.timedelta check on JWT_*_TOKEN_EXPIRES envs?

2 participants