From b36858f0cfc86cf36d80cd0185e8ca0062fc1791 Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Thu, 12 Dec 2019 15:41:37 +0100 Subject: [PATCH] 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. --- packages/auth/src/vpu-auth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/auth/src/vpu-auth.js b/packages/auth/src/vpu-auth.js index 7539d90c..83c8ce25 100644 --- a/packages/auth/src/vpu-auth.js +++ b/packages/auth/src/vpu-auth.js @@ -44,6 +44,7 @@ class VPUAuth extends VPULitElement { this.personId = ""; this.tryLogin = false; this.person = null; + this.entryPointUrl = commonUtils.getAPiUrl(); const _getLoginData = () => { const message = { @@ -109,7 +110,7 @@ class VPUAuth extends VPULitElement { } if (newPerson && this.loadPerson) { - JSONLD.initialize(commonUtils.getAPiUrl(), (jsonld) => { + JSONLD.initialize(this.entryPointUrl, (jsonld) => { // find the correct api url for the current person // we are fetching the logged-in person directly to respect the REST philosophy // see: https://github.com/api-platform/api-platform/issues/337 @@ -153,6 +154,7 @@ class VPUAuth extends VPULitElement { clientId: { type: String, attribute: 'client-id' }, silentCheckSsoUri: { type: String, attribute: 'silent-check-sso-uri' }, showProfile: { type: Boolean, attribute: 'show-profile' }, + entryPointUrl: { type: String, attribute: 'entry-point-url' }, name: { type: String, attribute: false }, token: { type: String, attribute: false }, subject: { type: String, attribute: false }, -- GitLab