1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed lack of oidc discovery filtering during testing

Tested oidc system on okta, Keycloak & Auth0
This commit is contained in:
Dan Brown
2021-10-14 13:37:55 +01:00
parent a5d72aa458
commit 855409bc4f
2 changed files with 5 additions and 3 deletions

View File

@ -149,7 +149,7 @@ class OidcProviderSettings
if (!empty($result['jwks_uri'])) {
$keys = $this->loadKeysFromUri($result['jwks_uri'], $httpClient);
$discoveredSettings['keys'] = array_filter($keys);
$discoveredSettings['keys'] = $this->filterKeys($keys);
}
return $discoveredSettings;
@ -161,7 +161,7 @@ class OidcProviderSettings
protected function filterKeys(array $keys): array
{
return array_filter($keys, function(array $key) {
return $key['key'] === 'RSA' && $key['use'] === 'sig' && $key['alg'] === 'RS256';
return $key['kty'] === 'RSA' && $key['use'] === 'sig' && $key['alg'] === 'RS256';
});
}