We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c8f5e7 commit 398ccd2Copy full SHA for 398ccd2
src/JWT.php
@@ -156,7 +156,7 @@ public static function decode(
156
// Check that this token has been created before 'now'. This prevents
157
// using tokens that have been created for later use (and haven't
158
// correctly used the nbf claim).
159
- if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
+ if (!isset($payload->nbf) && isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
160
throw new BeforeValidException(
161
'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat)
162
);
0 commit comments