diff --git a/src/LoginApp.vue b/src/LoginApp.vue index 3d24c2b1d0d56fc0b17b720d9cb55c81d04c8a57..b7b4be2a8c4b75df44c825822e85b2972483a47f 100644 --- a/src/LoginApp.vue +++ b/src/LoginApp.vue @@ -38,6 +38,8 @@ :is="(logoutState) ? logoutComponent : currentInputCard" :returnUrl="this.returnUrl" :shibbolethReturnUrl="this.shibbolethReturnUrl" + :testShibbolethReturnUrl="this.testShibbolethReturnUrl" + :fhShibbolethReturnUrl="this.fhShibbolethReturnUrl" :idpUrl="this.idpUrl" :loggedInWithShibboleth="this.loggedInWithShibboleth" :mergeReturnUrl="mergeReturnUrl" @@ -125,11 +127,12 @@ function getReturnUrlParam() { return returnUrlParameters; } -function getReturnUrl(method: string) { - const returnUrl = encodeURI( - '/coscine/api/Coscine.Api.STS/' + method + '/login?returnUrl=' + getReturnUrlParam(), - ); - return returnUrl; +function getReturnUrl(method: string, entityId: string = '') { + let returnUrl = '/coscine/api/Coscine.Api.STS/' + method + '/login?returnUrl=' + getReturnUrlParam(); + if (entityId !== '') { + returnUrl += '&entityId=' + entityId; + } + return encodeURI(returnUrl); } function getMergeReturnUrl() { @@ -145,7 +148,7 @@ function getAccountReturnUrl() { } function getShibbolethReturnUrl() { - return getReturnUrl('Shibboleth'); + return getReturnUrl('Shibboleth', 'https://login-test.rz.rwth-aachen.de/shibboleth'); } function getIdpUrl() { @@ -204,7 +207,9 @@ export default Vue.extend({ rwthImage: rootUrl + rwthImagePath, imageEnabled, returnUrl: getAccountReturnUrl(), - shibbolethReturnUrl: getShibbolethReturnUrl(), + shibbolethReturnUrl: getReturnUrl('Shibboleth', 'https://login.rz.rwth-aachen.de/shibboleth'), + testShibbolethReturnUrl: getReturnUrl('Shibboleth', 'https://login-test.rz.rwth-aachen.de/shibboleth'), + fhShibbolethReturnUrl: getReturnUrl('Shibboleth', 'https://login.fh-aachen.de/idp/shibboleth'), tosReturnUrl: getTOSReturnUrl(), mergeReturnUrl: getMergeReturnUrl(), idpUrl: getIdpUrl(), diff --git a/src/components/LoginMain.vue b/src/components/LoginMain.vue index 3ffe0b7d6391f4372069c346f83eec5040bcca5c..3bbad5cd2445be4f6d2f695512f7b89e407847a9 100644 --- a/src/components/LoginMain.vue +++ b/src/components/LoginMain.vue @@ -9,9 +9,15 @@ {{ $t('login_button_orcid') }} -
+ @@ -23,15 +29,23 @@ import Vue from 'vue'; export default Vue.extend({ name: 'LoginMain', + data: { + devMachine: false, + }, props: { returnUrl: String, shibbolethReturnUrl: String, + testShibbolethReturnUrl: String, + fhShibbolethReturnUrl: String, }, methods: { clickGetORCiDForm() { this.$emit('clickGetORCiDForm'); }, }, + created() { + this.devMachine = window.location.href.toString().indexOf('d-sp') !== -1; + } }); diff --git a/src/locale/de.ts b/src/locale/de.ts index 357c77d4243b148ae01d0eb33ba2d0e513d7189f..26770d623c7b075546e704a4e2fdae6304d21a80 100644 --- a/src/locale/de.ts +++ b/src/locale/de.ts @@ -10,7 +10,8 @@ export default { login_button_with_account: 'Login-Zugang', login_button_orcid: 'Anmelden mit ORCID', login_button_form: 'Anmelden mit User ID', - login_shibboleth: 'Anmelden mit Shibboleth', + login_rwth: 'Anmelden mit RWTH Aachen University', + login_fh: 'Anmelden mit University of Applied Sciences Aachen', login_button_without_account: 'Weiter ohne Login', logout_button_orcid: 'Logout von ORCID', logout_shibboleth: 'Logout von Shibboleth', diff --git a/src/locale/en.ts b/src/locale/en.ts index 31e8ba88cb2823fcb657c4f02aa4d061067ba172..d33da9f2f9f1b535eee29a9ab53efa8a884e3ec4 100644 --- a/src/locale/en.ts +++ b/src/locale/en.ts @@ -10,7 +10,8 @@ export default { login_button_with_account: 'Login Access', login_button_orcid: 'Sign in with ORCID', login_button_form: 'Sign in with a User ID', - login_shibboleth: 'Sign in with Shibboleth', + login_rwth: 'Sign in with RWTH Aachen University', + login_fh: 'Sign in with University of Applied Sciences Aachen', login_button_without_account: 'Continue without Login', logout_button_orcid: 'Logout from ORCID', logout_shibboleth: 'Logout from Shibboleth',