Skip to content

Commit d912a65

Browse files
authored
Fix #392: Now using array as default value for token_endpoint_auth_methods_supported in OpenIdConnect::applyClientCredentialsToRequest()
1 parent 6fe2ee3 commit d912a65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Yii Framework 2 authclient extension Change Log
44
2.2.17 under development
55
------------------------
66

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

99

1010
2.2.16 May 10, 2024

src/OpenIdConnect.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ protected function initUserAttributes()
365365
*/
366366
protected function applyClientCredentialsToRequest($request)
367367
{
368-
$supportedAuthMethods = $this->getConfigParam('token_endpoint_auth_methods_supported', 'client_secret_basic');
368+
$supportedAuthMethods = $this->getConfigParam('token_endpoint_auth_methods_supported', ['client_secret_basic']);
369369

370370
if (in_array('client_secret_basic', $supportedAuthMethods)) {
371371
$request->addHeaders([
@@ -400,7 +400,7 @@ protected function applyClientCredentialsToRequest($request)
400400
'assertion' => $assertion,
401401
]);
402402
} else {
403-
throw new InvalidConfigException('Unable to authenticate request: none of following auth methods is suported: ' . implode(', ', $supportedAuthMethods));
403+
throw new InvalidConfigException('Unable to authenticate request: none of following auth methods is supported: ' . implode(', ', $supportedAuthMethods));
404404
}
405405
}
406406

0 commit comments

Comments
 (0)