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

Add an entry-point-url attribute

We use it bundled in the API docs and need to set the right server depending on the api build env.
parent a3e8ff61
Branches
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ class VPUAuth extends VPULitElement { ...@@ -44,6 +44,7 @@ class VPUAuth extends VPULitElement {
this.personId = ""; this.personId = "";
this.tryLogin = false; this.tryLogin = false;
this.person = null; this.person = null;
this.entryPointUrl = commonUtils.getAPiUrl();
const _getLoginData = () => { const _getLoginData = () => {
const message = { const message = {
...@@ -109,7 +110,7 @@ class VPUAuth extends VPULitElement { ...@@ -109,7 +110,7 @@ class VPUAuth extends VPULitElement {
} }
if (newPerson && this.loadPerson) { if (newPerson && this.loadPerson) {
JSONLD.initialize(commonUtils.getAPiUrl(), (jsonld) => { JSONLD.initialize(this.entryPointUrl, (jsonld) => {
// find the correct api url for the current person // find the correct api url for the current person
// we are fetching the logged-in person directly to respect the REST philosophy // we are fetching the logged-in person directly to respect the REST philosophy
// see: https://github.com/api-platform/api-platform/issues/337 // see: https://github.com/api-platform/api-platform/issues/337
...@@ -153,6 +154,7 @@ class VPUAuth extends VPULitElement { ...@@ -153,6 +154,7 @@ class VPUAuth extends VPULitElement {
clientId: { type: String, attribute: 'client-id' }, clientId: { type: String, attribute: 'client-id' },
silentCheckSsoUri: { type: String, attribute: 'silent-check-sso-uri' }, silentCheckSsoUri: { type: String, attribute: 'silent-check-sso-uri' },
showProfile: { type: Boolean, attribute: 'show-profile' }, showProfile: { type: Boolean, attribute: 'show-profile' },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
name: { type: String, attribute: false }, name: { type: String, attribute: false },
token: { type: String, attribute: false }, token: { type: String, attribute: false },
subject: { type: String, attribute: false }, subject: { type: String, attribute: false },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment