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
->example('mysecret')
->end()
// API docs. This is still Keycloak specific because we only have a keycloak
// web component right now.
// API Frontend (API docs etc)
->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')
->setDeprecated('dbp/relay-auth-bundle', '0.1.12', 'No longer needed')
->info('The Keycloak server base URL')
->example('https://keycloak.example.com/auth')
->end()
->scalarNode('frontend_keycloak_realm')
->setDeprecated('dbp/relay-auth-bundle', '0.1.12', 'No longer needed')
->info('The keycloak realm')
->example('client-docs')
->end()
->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')
->example('client-docs')
->end()
......
......@@ -39,6 +39,8 @@ class DbpRelayAuthExtension extends ConfigurableExtension implements PrependExte
{
$config = $container->getExtensionConfig($this->getAlias())[0];
$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_realm' => $config['frontend_keycloak_realm'] ?? '',
'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