Skip to content

Commit

Permalink
Merge pull request #276 from azmeuk/expected-at-hash-fix
Browse files Browse the repository at this point in the history
verifyJWTclaims: fixed an exception when $accessToken is null
  • Loading branch information
azmeuk authored Nov 20, 2021
2 parents e44e56c + eaeb520 commit 131e7f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ protected function verifyJWTclaims($claims, $accessToken = null) {
&& ($claims->nonce === $this->getNonce())
&& ( !isset($claims->exp) || ((gettype($claims->exp) === 'integer') && ($claims->exp >= time() - $this->leeway)))
&& ( !isset($claims->nbf) || ((gettype($claims->nbf) === 'integer') && ($claims->nbf <= time() + $this->leeway)))
&& ( !isset($claims->at_hash) || $claims->at_hash === $expected_at_hash )
&& ( !isset($claims->at_hash) || !isset($accessToken) || $claims->at_hash === $expected_at_hash )
);
}

Expand Down

0 comments on commit 131e7f9

Please sign in to comment.