Skip to content

Commit

Permalink
Merge pull request #21 from bolner/main
Browse files Browse the repository at this point in the history
nbf validation issue #20
  • Loading branch information
adhocore authored Oct 8, 2020
2 parents 4ffaf9b + deda16c commit 803942a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ValidatesJWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 803942a

Please sign in to comment.