Skip to content

Commit

Permalink
Fix #392: Now using array as default value for `token_endpoint_auth_m…
Browse files Browse the repository at this point in the history
…ethods_supported` in `OpenIdConnect::applyClientCredentialsToRequest()`
  • Loading branch information
rhertogh authored Sep 9, 2024
1 parent 6fe2ee3 commit d912a65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii Framework 2 authclient extension Change Log
2.2.17 under development
------------------------

- no changes in this release.
- Bug #392: Now using array as default value for `token_endpoint_auth_methods_supported` in `OpenIdConnect::applyClientCredentialsToRequest()` (strtob, rhertogh)


2.2.16 May 10, 2024
Expand Down
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 d912a65

Please sign in to comment.