Skip to content

Fix #392: Now using array as default value for token_endpoint_auth_methods_supported in OpenIdConnect::applyClientCredentialsToRequest() #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading