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) {