Skip to content

Commit

Permalink
fix: use issuer URL from openid configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
radwouters committed Apr 7, 2023
1 parent eb5d09d commit abb4b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OpenIdConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ protected function loadJws($jws)
*/
protected function validateClaims(array $claims)
{
if (!isset($claims['iss']) || (strcmp(rtrim($claims['iss'], '/'), rtrim($this->issuerUrl, '/')) !== 0)) {
$expectedIssuer = $this->getConfigParam('issuer', $this->issuerUrl);
if (!isset($claims['iss']) || (strcmp(rtrim($claims['iss'], '/'), rtrim($expectedIssuer, '/')) !== 0)) {
throw new HttpException(400, 'Invalid "iss"');
}
if (!isset($claims['aud'])
Expand Down

0 comments on commit abb4b81

Please sign in to comment.