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

JWT token that doesn't supply expiration is assumed as valid #335

Open
jonathanwiesel opened this issue Nov 19, 2021 · 2 comments
Open

JWT token that doesn't supply expiration is assumed as valid #335

jonathanwiesel opened this issue Nov 19, 2021 · 2 comments

Comments

@jonathanwiesel
Copy link

When a token response does not supply the current detected attributes for token expiration (expires_in_sec, expires_in, expires) the token is assumed to be valid.

@jonathanwiesel jonathanwiesel changed the title JWT token that doesn'y supply expiration is assumed as valid JWT token that doesn't supply expiration is assumed as valid Nov 19, 2021
@sqrrrl
Copy link
Member

sqrrrl commented Jan 25, 2022

Need more information for this to be actionable. Can you provide a sample of where you think this is an issue?

AFAICT non-expiring JWTs are allowed (although strongly discouraged) and it's not clear what, if any, changes should be made to the library.

@jonathanwiesel
Copy link
Author

Sure thing, the hasAccessmethod is checking the isExpired method, which checks for specific attributes (expires_in_sec, expires_in, expires) to determine expiration, in case there's no expiration supplied (rare but could happen) or the expiration attribute name is different than the currently configured ones (for example exp) the method returns false, therefore considering it not expired.

Would be great that in case a different expiration attribute is supplied by a system it could be at least supplied as configuration

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

No branches or pull requests

2 participants