Skip to content

Commit

Permalink
Fixed default value type for token_endpoint_auth_methods_supported
Browse files Browse the repository at this point in the history
…in `\yii\authclient\OpenIdConnect::applyClientCredentialsToRequest()`
  • Loading branch information
rhertogh committed Sep 8, 2024
1 parent 6fe2ee3 commit e878709
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OpenIdConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ protected function initUserAttributes()
*/
protected function applyClientCredentialsToRequest($request)
{
$supportedAuthMethods = $this->getConfigParam('token_endpoint_auth_methods_supported', 'client_secret_basic');
$supportedAuthMethods = $this->getConfigParam('token_endpoint_auth_methods_supported', ['client_secret_basic']);

if (in_array('client_secret_basic', $supportedAuthMethods)) {
$request->addHeaders([
Expand Down Expand Up @@ -400,7 +400,7 @@ protected function applyClientCredentialsToRequest($request)
'assertion' => $assertion,
]);
} else {
throw new InvalidConfigException('Unable to authenticate request: none of following auth methods is suported: ' . implode(', ', $supportedAuthMethods));
throw new InvalidConfigException('Unable to authenticate request: none of following auth methods is supported: ' . implode(', ', $supportedAuthMethods));
}
}

Expand Down

0 comments on commit e878709

Please sign in to comment.