From 283ea99a80ac237bed8d35405d7af1de2c3b30f5 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 4 Aug 2021 15:22:52 +0200
Subject: [PATCH] showcase: update keycloak realm for local/dev

---
 toolkit-showcase/app.config.js                        | 2 ++
 toolkit-showcase/assets/dbp-toolkit-showcase.html.ejs | 2 +-
 toolkit-showcase/rollup.config.js                     | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/toolkit-showcase/app.config.js b/toolkit-showcase/app.config.js
index cf4c590a..286fadae 100644
--- a/toolkit-showcase/app.config.js
+++ b/toolkit-showcase/app.config.js
@@ -3,6 +3,7 @@ export default {
         basePath: '/dist/',
         entryPointURL: 'http://127.0.0.1:8000',
         keyCloakBaseURL: 'https://auth-dev.tugraz.at/auth',
+        keyCloakRealm: 'tugraz-vpu',
         keyCloakClientId: 'auth-dev-mw-frontend-local',
         matomoUrl: 'https://analytics.tugraz.at/',
         matomoSiteId: 131,
@@ -13,6 +14,7 @@ export default {
         basePath: '/apps/demo/',
         entryPointURL: 'https://mw-dev.tugraz.at',
         keyCloakBaseURL: 'https://auth-dev.tugraz.at/auth',
+        keyCloakRealm: 'tugraz-vpu',
         keyCloakClientId: 'demo-dev_tugraz_at-DEMO',
         matomoUrl: 'https://analytics.tugraz.at/',
         matomoSiteId: 131,
diff --git a/toolkit-showcase/assets/dbp-toolkit-showcase.html.ejs b/toolkit-showcase/assets/dbp-toolkit-showcase.html.ejs
index e04658f2..393ff138 100644
--- a/toolkit-showcase/assets/dbp-toolkit-showcase.html.ejs
+++ b/toolkit-showcase/assets/dbp-toolkit-showcase.html.ejs
@@ -72,7 +72,7 @@
     src="<%= getUrl(name + '.topic.metadata.json') %>"
     lang="en"
     base-path="<%= getUrl('') %>"
-    keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "tugraz", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= getUrl('silent-check-sso.html') %>"}'
+    keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "<%= keyCloakRealm %>", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= getUrl('silent-check-sso.html') %>"}'
     matomo-url="<%= matomoUrl %>" matomo-site-id="<%= matomoSiteId %>"
     git-info='<%= buildInfo.info %>'
     build-url='<%= buildInfo.url %>'
diff --git a/toolkit-showcase/rollup.config.js b/toolkit-showcase/rollup.config.js
index c61fb281..c621f657 100644
--- a/toolkit-showcase/rollup.config.js
+++ b/toolkit-showcase/rollup.config.js
@@ -35,6 +35,7 @@ if (appEnv in appConfig) {
         basePath: '/',
         entryPointURL: 'https://test',
         keyCloakBaseURL: 'https://test',
+        keyCloakRealm: '',
         keyCloakClientId: '',
         matomoUrl: '',
         matomoSiteId: -1,
@@ -102,6 +103,7 @@ export default (async () => {
             nextcloudFileURL: config.nextcloudFileURL,
             nextcloudName: config.nextcloudName,
             keyCloakBaseURL: config.keyCloakBaseURL,
+            keyCloakRealm: config.keyCloakRealm,
             keyCloakClientId: config.keyCloakClientId,
             CSP: config.CSP,
             matomoUrl: config.matomoUrl,
-- 
GitLab