mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 11:52:34 +01:00
Fixed lack of oidc discovery filtering during testing
Tested oidc system on okta, Keycloak & Auth0
This commit is contained in:
parent
a5d72aa458
commit
855409bc4f
@ -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';
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
});
|
||||
|
||||
$this->app->bind(HttpClientInterface::class, function($app) {
|
||||
return new Client(['timeout' => 3]);
|
||||
return new Client([
|
||||
'timeout' => 3,
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user