Commits (3)
{
"name": "@coscine/login",
"version": "1.12.0",
"version": "1.13.0",
"private": true,
"directories": {
"doc": "docs"
......@@ -11,7 +11,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@coscine/api-connection": "^1.24.2",
"@coscine/api-connection": "^1.25.0",
"@coscine/component-library": "^1.5.0",
"@itcenter-layout/bootstrap": "^1.5.5",
"@itcenter-layout/masterpage": "^1.3.0",
......
......@@ -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(),
......
......@@ -9,9 +9,15 @@
<span> {{ $t('login_button_orcid') }}</span>
</button>
</div>
<form class="w-100" :action="shibbolethReturnUrl" method="post">
<form class="w-100" :action="devMachine === true ? testShibbolethReturnUrl : shibbolethReturnUrl" method="post">
<div class="row">
<input class="btn btn-primary w-100" type="Submit" :value="$t('login_shibboleth')" />
<input class="btn btn-primary w-100" type="Submit" :value="$t('login_rwth')" />
<input type="hidden" name="wa" value="wsignin1.0" />
</div>
</form>
<form class="w-100" :action="fhShibbolethReturnUrl" method="post">
<div class="row">
<input class="btn btn-primary w-100" type="Submit" :value="$t('login_fh')" />
<input type="hidden" name="wa" value="wsignin1.0" />
</div>
</form>
......@@ -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;
}
});
</script>
......
......@@ -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',
......
......@@ -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',
......
This diff is collapsed.