Skip to content

Commit 803942a

Browse files
authored
Merge pull request #21 from bolner/main
nbf validation issue #20
2 parents 4ffaf9b + deda16c commit 803942a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ValidatesJWT.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function validateTimestamps(array $payload)
8686
$checks = [
8787
['exp', $this->leeway /* */ , static::ERROR_TOKEN_EXPIRED, 'Expired'],
8888
['iat', $this->maxAge - $this->leeway, static::ERROR_TOKEN_EXPIRED, 'Expired'],
89-
['nbf', $this->maxAge - $this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'],
89+
['nbf', -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'],
9090
];
9191

9292
foreach ($checks as list($key, $offset, $code, $error)) {

0 commit comments

Comments
 (0)