Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

use JWT timestamp to validate claims #181

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

Open
lutangar wants to merge 2 commits into TheNetworg:master
base: master
Choose a base branch
Loading
from larriereguichet:jwt-timestamp

Conversation

@lutangar
Copy link

@lutangar lutangar commented Mar 7, 2023

This allows better testability.

This feature is better described in the JWT class :

Allow the current timestamp to be specified. Useful for fixing a value within unit testing.
https://github.com/firebase/php-jwt/blob/3b454f90f147db65a615041dec6661f427d6cb00/src/JWT.php#L43-L50

This allows better testability.
This feature is better described in the `JWT` class :
> Allow the current timestamp to be specified. Useful for fixing a value within unit testing.
> https://github.com/firebase/php-jwt/blob/3b454f90f147db65a615041dec6661f427d6cb00/src/JWT.php#L43-L50 
Copy link
Author

lutangar commented Mar 7, 2023
edited
Loading

Didn't notice at first but #178 is related. I could implement the JWT::$leeway in this one if interested.

Copy link
Contributor

Yes make sens 👍

Copy link
Author

lutangar commented Mar 9, 2023
edited
Loading

Added JWT::$leeway usage in 2b563b8, as seen in #178

This allows time manipulation for testing purpose.
See JWTTest.php#L79-L90 for a usecase.

Copy link
Author

Ping @hajekj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /