From d17ba9f735512e4bfcb3fb3dbe9ee97421ff9780 Mon Sep 17 00:00:00 2001 From: phil Date: Fri, 31 Jan 2025 03:12:36 +0100 Subject: [PATCH] Move settings as dynamic json file; nice token info display --- .gitignore | 1 + example_settings.json | 15 +++++++++ public/styles.css | 17 +++++++--- src/App.vue | 39 ++++++++++++++++------ src/main.ts | 76 ++++++++++++++++++++++++++++--------------- 5 files changed, 106 insertions(+), 42 deletions(-) create mode 100644 example_settings.json diff --git a/.gitignore b/.gitignore index 3659f1a..c91899f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/* dist/* +settings.json diff --git a/example_settings.json b/example_settings.json new file mode 100644 index 0000000..4acce43 --- /dev/null +++ b/example_settings.json @@ -0,0 +1,15 @@ +{ + "keycloakUri": "https://philo.ydns.eu/auth", + "realm": "test", + "authProvider": "keycloak", + "sso": false, + "clientId": "oidc-test-web", + "resourceServerUrl": "https://philo.ydns.eu/oidc-test/resource", + "resourceScopes": [ + "get:time", + "get:bs" + ], + "sslCertFile": "/path/to/cert.pem", + "sslKeyFile": "/path/to/key.pem", + "tokenSandbox": true +} diff --git a/public/styles.css b/public/styles.css index c85edba..06d40a8 100644 --- a/public/styles.css +++ b/public/styles.css @@ -171,10 +171,6 @@ hr { font-family: monospace; } -.from-keycloak-vue { - display: none; -} - .actions { display: flex; justify-content: center; @@ -202,6 +198,17 @@ hr { text-align: center; } -.resource .key { +.from-keycloak-vue { + margin: 0 1em; +} + +.key { font-weight: bold; } + +.token .key, .token .value { + display: inline; +} +.token .value { + padding-left: 1em; +} diff --git a/src/App.vue b/src/App.vue index 35bdd1b..b541802 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,10 @@