Skip to content

Commit

Permalink
nbf validation issue #20
Browse files Browse the repository at this point in the history
  • Loading branch information
bolner committed Oct 8, 2020
1 parent 4ffaf9b commit deda16c
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 deda16c

Please sign in to comment.