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

Revert "Add a keycloak-config attribute and forward it to vpu-auth"

This reverts commit 299dfdded2b3a56a9e666e70c301c7408e570eba.
parent 057fb6c1
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,10 @@ activities. Handles login, language selection, activity switching, menus etc.
## Attributes
- `lang` (optional, default: `de`): set to `de` or `en` for German or English
- example `<vpu-app-shell lang="de" </vpu-app-shell>`
- example `<vpu-auth lang="de" </vpu-auth>`
- `src`: The path to a topic metadata file (json)
- `base-path` (optional, default: `/`: An absolute base path for routing
- `entry-point-url`: Entry point URL to access the API
- `keycloak-config`: See `vpu-auth` for details
## Topic Metadata
......
......@@ -5,6 +5,7 @@ import {LanguageSelect} from 'vpu-language-select';
import {Icon} from 'vpu-common';
import {Auth} from 'vpu-auth';
import {Notification} from 'vpu-notification';
import * as commonUtils from 'vpu-common/utils';
import * as commonStyles from 'vpu-common/styles';
import buildinfo from 'consts:buildinfo';
import {classMap} from 'lit-html/directives/class-map.js';
......@@ -46,14 +47,13 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
super();
this.lang = i18n.language;
this.activeView = '';
this.entryPointUrl = '';
this.entryPointUrl = commonUtils.getAPiUrl();
this.subtitle = '';
this.description = '';
this.routes = [];
this.metadata = {};
this.topic = {};
this.basePath = '/';
this.keycloakConfig = null;
this._updateAuth = this._updateAuth.bind(this);
this._loginStatus = 'unknown';
......@@ -218,7 +218,6 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
basePath: { type: String, attribute: 'base-path' },
activeView: { type: String, attribute: false},
entryPointUrl: { type: String, attribute: 'entry-point-url' },
keycloakConfig: { type: Object, attribute: 'keycloak-config' },
metadata: { type: Object, attribute: false },
topic: { type: Object, attribute: false },
subtitle: { type: String, attribute: false },
......@@ -638,6 +637,8 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
}
render() {
const silentCheckSsoUri = commonUtils.getAssetURL('silent-check-sso.html');
const getSelectClasses = (name => {
return classMap({selected: this.activeView === name});
});
......@@ -684,7 +685,7 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
<div class="hd1-middle">
</div>
<div class="hd1-right">
<vpu-auth lang="${this.lang}" show-profile keycloak-config="${JSON.stringify(this.keycloakConfig)}" load-person try-login></vpu-auth>
<vpu-auth lang="${this.lang}" show-profile keycloak-config='{"clientId": "${commonUtils.setting('keyCloakClientId')}", "silentCheckSsoRedirectUri": "${silentCheckSsoUri}"}' load-person try-login></vpu-auth>
</div>
<div class="hd2-left">
<div class="header">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment