Skip to content
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

(InvalidIssuedAtError) not implemented for future iat's ? #266

Closed
marcelofern opened this issue May 23, 2017 · 2 comments
Closed

(InvalidIssuedAtError) not implemented for future iat's ? #266

marcelofern opened this issue May 23, 2017 · 2 comments
Labels
docs stale Issues without activity for more than 60 days

Comments

@marcelofern
Copy link

Hi,

According to the docs, jwt.exceptions.InvalidIssuedAtError should be raised when iat has a future date.
reference

Issue:
I am trying to raise: InvalidIssuedAtError

What I am doing:

I am using a token with a future iat timestamp, something like:

future_payload = {
                        'username': 'test@test.com',
                        'iat': datetime.now() + timedelta(seconds=500),
                        'exp': datetime.now() + timedelta(seconds=1000)
                        }

future_token = encode(future_payload, TOKEN_SECRET, algorithm=TOKEN_ALGORITHM)
decoded = decode(future_token, TOKEN_SECRET, algorithms=[TOKEN_ALGORITHM])

well, this works perfectly, the problem is that it shouldn't :P
I looked at the code and the only reference for this exception that i have found is this one:
raise InvalidIssuedAtError('Issued At claim (iat) must be an integer.')

Am I correct? Or I am very blind-sided here? =P

@mark-adams
Copy link
Contributor

We removed that functionality because it was not very standard and tripped up a lot of people. See #190.

A pull request would be welcome to update the docs.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Issues without activity for more than 60 days label Jun 24, 2022
@github-actions github-actions bot closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs stale Issues without activity for more than 60 days
Projects
None yet
Development

No branches or pull requests

2 participants