Skip to content
Snippets Groups Projects
Commit 2d58c86e authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

config: add a new "frontend_client_id" and deprecate all keycloak ones

The core bundle will now extract the keycloak specifics from the main
server URL at runtime in the frontend. This means we no longer have to
expose keycloak specific options here.
parent f16ed4a3
No related branches found
No related tags found
No related merge requests found
Pipeline #204667 passed
...@@ -46,17 +46,25 @@ class Configuration implements ConfigurationInterface ...@@ -46,17 +46,25 @@ class Configuration implements ConfigurationInterface
->example('mysecret') ->example('mysecret')
->end() ->end()
// API docs. This is still Keycloak specific because we only have a keycloak // API Frontend (API docs etc)
// web component right now. ->scalarNode('frontend_client_id')
->info('The client ID for the OIDC client (authorization code flow) used for API docs and other frontends provided by the API itself')
->example('client-docs')
->end()
// [DEPRECATED]
->scalarNode('frontend_keycloak_server') ->scalarNode('frontend_keycloak_server')
->setDeprecated('dbp/relay-auth-bundle', '0.1.12', 'No longer needed')
->info('The Keycloak server base URL') ->info('The Keycloak server base URL')
->example('https://keycloak.example.com/auth') ->example('https://keycloak.example.com/auth')
->end() ->end()
->scalarNode('frontend_keycloak_realm') ->scalarNode('frontend_keycloak_realm')
->setDeprecated('dbp/relay-auth-bundle', '0.1.12', 'No longer needed')
->info('The keycloak realm') ->info('The keycloak realm')
->example('client-docs') ->example('client-docs')
->end() ->end()
->scalarNode('frontend_keycloak_client_id') ->scalarNode('frontend_keycloak_client_id')
->setDeprecated('dbp/relay-auth-bundle', '0.1.12', 'Use "frontend_client_id" instead')
->info('The ID for the keycloak client (authorization code flow) used for API docs or similar') ->info('The ID for the keycloak client (authorization code flow) used for API docs or similar')
->example('client-docs') ->example('client-docs')
->end() ->end()
......
...@@ -39,6 +39,8 @@ class DbpRelayAuthExtension extends ConfigurableExtension implements PrependExte ...@@ -39,6 +39,8 @@ class DbpRelayAuthExtension extends ConfigurableExtension implements PrependExte
{ {
$config = $container->getExtensionConfig($this->getAlias())[0]; $config = $container->getExtensionConfig($this->getAlias())[0];
$this->extendArrayParameter($container, 'dbp_api.twig_globals', [ $this->extendArrayParameter($container, 'dbp_api.twig_globals', [
'oidc_server_url' => $config['server_url'] ?? '',
'oidc_frontend_client_id' => $config['frontend_client_id'] ?? '',
'keycloak_server_url' => $config['frontend_keycloak_server'] ?? '', 'keycloak_server_url' => $config['frontend_keycloak_server'] ?? '',
'keycloak_realm' => $config['frontend_keycloak_realm'] ?? '', 'keycloak_realm' => $config['frontend_keycloak_realm'] ?? '',
'keycloak_frontend_client_id' => $config['frontend_keycloak_client_id'] ?? '', 'keycloak_frontend_client_id' => $config['frontend_keycloak_client_id'] ?? '',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment