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

Configure keycloak at runtime instead of at build time

We now pass through all the keycloak config to the vpu-auth element
instead of depending on the env.js hardcoded values.

The goal is to get rid of env.js in the long run so we only have one bundle
build.
parent 20ed9e8f
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,13 @@
</head>
<body>
<vpu-app-signature lang="de" src="<%= geturl('vpu-signature.topic.metadata.json') %>" entry-point-url="<%= entryPointURL %>" base-path="<%= geturl('') %>"><vpu-loading-spinner></vpu-loading-spinner></vpu-app-signature>
<vpu-app-signature
lang="de"
src="<%= geturl('vpu-signature.topic.metadata.json') %>"
entry-point-url="<%= entryPointURL %>"
base-path="<%= geturl('') %>"
keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "tugraz", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= geturl('silent-check-sso.html') %>"}'
><vpu-loading-spinner></vpu-loading-spinner></vpu-app-signature>
<!-- Error handling for too old browsers -->
<script src="<%= geturl('local/vpu-signature/browser-check.js') %>" defer></script>
......
......@@ -33,6 +33,7 @@ let basePath = '';
let entryPointURL = '';
let keyCloakServer = '';
let keyCloakBaseURL = '';
let keyCloakClientId = '';
let pdfAsQualifiedlySigningServer = 'sig-dev.tugraz.at';
let matomoSiteId = 131;
let useTerser = true;
......@@ -45,6 +46,7 @@ switch (build) {
entryPointURL = 'http://127.0.0.1:8000';
keyCloakServer = 'auth-dev.tugraz.at';
keyCloakBaseURL = 'https://' + keyCloakServer + '/auth';
keyCloakClientId = 'auth-dev-mw-frontend-local';
useTerser = false;
break;
case 'development':
......@@ -52,18 +54,21 @@ switch (build) {
entryPointURL = 'https://mw-dev.tugraz.at';
keyCloakServer = 'auth-dev.tugraz.at';
keyCloakBaseURL = 'https://' + keyCloakServer + '/auth';
keyCloakClientId = 'auth-dev-mw-frontend';
break;
case 'demo':
basePath = '/apps/signature/';
entryPointURL = 'https://api-demo.tugraz.at';
keyCloakServer = 'auth-test.tugraz.at';
keyCloakBaseURL = 'https://' + keyCloakServer + '/auth';
keyCloakClientId = 'ibib-demo_tugraz_at-IBIB';
break;
case 'production':
basePath = '/';
entryPointURL = 'https://api.tugraz.at';
keyCloakServer = 'auth.tugraz.at';
keyCloakBaseURL = 'https://' + keyCloakServer + '/auth';
keyCloakClientId = 'ibib_tugraz_at-IBIB';
pdfAsQualifiedlySigningServer = 'sig.tugraz.at';
matomoSiteId = 130;
break;
......@@ -72,6 +77,7 @@ switch (build) {
entryPointURL = '';
keyCloakServer = '';
keyCloakBaseURL = '';
keyCloakClientId = '';
useTerser = false;
break;
default:
......@@ -200,6 +206,7 @@ export default {
entryPointURL: entryPointURL,
keyCloakServer: keyCloakServer,
keyCloakBaseURL: keyCloakBaseURL,
keyCloakClientId: keyCloakClientId,
pdfAsQualifiedlySigningServer: pdfAsQualifiedlySigningServer,
environment: build,
matomoSiteId: matomoSiteId,
......
Subproject commit ce1f65f15e5cf1c22836118e097e7c0558e41ebf
Subproject commit a22f3f056add8c6db83ff3b73fb10df2d24e0e99
Subproject commit b9fbe487a8a6117ae90a423a8ba318a0321bf51b
Subproject commit 2e179331c2f7572a85e98c825736a3c93494e1ea
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment