mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-26 22:24:05 +08: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'])) {
|
if (!empty($result['jwks_uri'])) {
|
||||||
$keys = $this->loadKeysFromUri($result['jwks_uri'], $httpClient);
|
$keys = $this->loadKeysFromUri($result['jwks_uri'], $httpClient);
|
||||||
$discoveredSettings['keys'] = array_filter($keys);
|
$discoveredSettings['keys'] = $this->filterKeys($keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $discoveredSettings;
|
return $discoveredSettings;
|
||||||
@ -161,7 +161,7 @@ class OidcProviderSettings
|
|||||||
protected function filterKeys(array $keys): array
|
protected function filterKeys(array $keys): array
|
||||||
{
|
{
|
||||||
return array_filter($keys, function(array $key) {
|
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) {
|
$this->app->bind(HttpClientInterface::class, function($app) {
|
||||||
return new Client(['timeout' => 3]);
|
return new Client([
|
||||||
|
'timeout' => 3,
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user