From b1d1d54187fb86df2a8bf7bc95ea7665f34dea39 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 20 Nov 2023 17:20:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/firebase/php-jwt/src/JWT.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vendor/firebase/php-jwt/src/JWT.php b/vendor/firebase/php-jwt/src/JWT.php index 0ee7712b..151a9734 100644 --- a/vendor/firebase/php-jwt/src/JWT.php +++ b/vendor/firebase/php-jwt/src/JWT.php @@ -139,20 +139,20 @@ class JWT // 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) && $payload->nbf > ($timestamp + static::$leeway)) { - // throw new BeforeValidException( - // 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf) - // ); - // } + if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) { + throw new BeforeValidException( + 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf) + ); + } // Check that this token has been created before 'now'. This prevents // using tokens that have been created for later use (and haven't // correctly used the nbf claim). - // if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) { - // throw new BeforeValidException( - // 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat) - // ); - // } + if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) { + throw new BeforeValidException( + 'Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat) + ); + } // Check if this token has expired. if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {