Skip to content

Commit

Permalink
fix: Update well known config value function response types (#376)
Browse files Browse the repository at this point in the history
* Fix: Update well known config value function response types

* Update CHANGELOG

* Update wellknown typing array to be string[]

* Update wellknown typing null can be default but would never be returned
  • Loading branch information
ricklambrechts committed Jul 26, 2023
1 parent 8ec206b commit c146b71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Update construct typehint in docblock. #364
* Fixed LogoutToken verification for single value aud claims #334
* Added function to set useragent #370
* Update well known config value function response types #376

### Added
- Support for signed and encrypted UserInfo response. #305
Expand Down
18 changes: 9 additions & 9 deletions src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,13 @@ protected function addAdditionalJwk($jwk) {
* Gets anything that we need configuration wise including endpoints, and other values
*
* @param string $param
* @param string|array|null $default optional
* @return string|array
* @param string|string[]|bool|null $default optional
* @return string|string[]|bool
*
*@throws OpenIDConnectClientException
* @throws OpenIDConnectClientException
*/
protected function getProviderConfigValue(string $param, $default = null) {

protected function getProviderConfigValue(string $param, $default = null)
{
// If the configuration value is not available, attempt to fetch it from a well known config endpoint
// This is also known as auto "discovery"
if (!isset($this->providerConfig[$param])) {
Expand All @@ -607,12 +607,12 @@ protected function getProviderConfigValue(string $param, $default = null) {
* Gets anything that we need configuration wise including endpoints, and other values
*
* @param string $param
* @param string|null $default optional
* @return string
* @param string|string[]|bool|null $default optional
* @return string|string[]|bool
*
*@throws OpenIDConnectClientException
* @throws OpenIDConnectClientException
*/
protected function getWellKnownConfigValue(string $param, string $default = null): string
protected function getWellKnownConfigValue(string $param, $default = null)
{

// If the configuration value is not available, attempt to fetch it from a well known config endpoint
Expand Down

0 comments on commit c146b71

Please sign in to comment.