Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into patch-1
  • Loading branch information
ennorehling authored Mar 22, 2024
commit b2e5d09a2cb55de453f88bf0c3eaf7fe2fe48fab
4 changes: 2 additions & 2 deletions src/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static function decode(
// Check the nbf if it is defined. This is the time that the
// token can actually be used. If it's not yet that time, abort.
if (isset($payload->nbf) && floor($payload->nbf) > ($timestamp + static::$leeway)) {
throw new BeforeValidException(
$ex = new BeforeValidException(
'Cannot handle token with nbf prior to ' . \date(DateTime::ATOM, (int) $payload->nbf)
);
$ex->setPayload($payload);
Expand All @@ -164,7 +164,7 @@ public static function decode(
// using tokens that have been created for later use (and haven't
// correctly used the nbf claim).
if (!isset($payload->nbf) && isset($payload->iat) && floor($payload->iat) > ($timestamp + static::$leeway)) {
throw new BeforeValidException(
$ex = new BeforeValidException(
'Cannot handle token with iat prior to ' . \date(DateTime::ATOM, (int) $payload->iat)
);
$ex->setPayload($payload);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.