From deda16c5b74f008b0ec620749b45f30922e250ee Mon Sep 17 00:00:00 2001 From: Tamas Bolner Date: Fri, 9 Oct 2020 01:50:51 +0200 Subject: [PATCH] nbf validation issue #20 --- src/ValidatesJWT.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ValidatesJWT.php b/src/ValidatesJWT.php index e111036..742c2c6 100644 --- a/src/ValidatesJWT.php +++ b/src/ValidatesJWT.php @@ -86,7 +86,7 @@ protected function validateTimestamps(array $payload) $checks = [ ['exp', $this->leeway /* */ , static::ERROR_TOKEN_EXPIRED, 'Expired'], ['iat', $this->maxAge - $this->leeway, static::ERROR_TOKEN_EXPIRED, 'Expired'], - ['nbf', $this->maxAge - $this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'], + ['nbf', -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'], ]; foreach ($checks as list($key, $offset, $code, $error)) {