oauth2-azure icon indicating copy to clipboard operation
oauth2-azure copied to clipboard

use JWT timestamp to validate claims

Open lutangar opened this issue 1 year ago • 4 comments

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

lutangar avatar Mar 07 '23 16:03 lutangar

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

lutangar avatar Mar 07 '23 16:03 lutangar

Yes make sens 👍

elernonelma avatar Mar 09 '23 08:03 elernonelma

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.

lutangar avatar Mar 09 '23 09:03 lutangar

Ping @hajekj

lutangar avatar Dec 21 '23 17:12 lutangar