Commits (6)
This diff is collapsed.
{ {
"name": "@coscine/login", "name": "@coscine/login",
"version": "1.6.0", "version": "1.7.0",
"private": true, "private": true,
"directories": { "directories": {
"doc": "docs" "doc": "docs"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit"
}, },
"dependencies": { "dependencies": {
"@coscine/api-connection": "^1.15.0", "@coscine/api-connection": "^1.16.0",
"@itcenter-layout/bootstrap": "^1.5.5", "@itcenter-layout/bootstrap": "^1.5.5",
"@itcenter-layout/masterpage": "^1.2.9", "@itcenter-layout/masterpage": "^1.2.9",
"@types/jquery": "^3.3.38", "@types/jquery": "^3.3.38",
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
:shibbolethReturnUrl="this.shibbolethReturnUrl" :shibbolethReturnUrl="this.shibbolethReturnUrl"
:idpUrl="this.idpUrl" :idpUrl="this.idpUrl"
:loggedInWithShibboleth="this.loggedInWithShibboleth" :loggedInWithShibboleth="this.loggedInWithShibboleth"
:mergeReturnUrl="mergeReturnUrl"
@back="loginBack" @back="loginBack"
@clickGetLoginForm="getLoginForm" @clickGetLoginForm="getLoginForm"
@clickGetORCiDForm="getORCiDForm" @clickGetORCiDForm="getORCiDForm"
...@@ -117,6 +118,10 @@ function getReturnUrl(method: string) { ...@@ -117,6 +118,10 @@ function getReturnUrl(method: string) {
return returnUrl; return returnUrl;
} }
function getMergeReturnUrl() {
return getReturnUrl('Merge');
}
function getTOSReturnUrl() { function getTOSReturnUrl() {
return encodeURI('' + getReturnUrlParam()); return encodeURI('' + getReturnUrlParam());
} }
...@@ -188,6 +193,7 @@ export default Vue.extend({ ...@@ -188,6 +193,7 @@ export default Vue.extend({
returnUrl: getAccountReturnUrl(), returnUrl: getAccountReturnUrl(),
shibbolethReturnUrl: getShibbolethReturnUrl(), shibbolethReturnUrl: getShibbolethReturnUrl(),
tosReturnUrl: getTOSReturnUrl(), tosReturnUrl: getTOSReturnUrl(),
mergeReturnUrl: getMergeReturnUrl(),
idpUrl: getIdpUrl(), idpUrl: getIdpUrl(),
orcidUrl: getORCiDUrl(), orcidUrl: getORCiDUrl(),
logoutState: getIsLogout(), logoutState: getIsLogout(),
......
...@@ -32,11 +32,16 @@ export default Vue.extend({ ...@@ -32,11 +32,16 @@ export default Vue.extend({
}; };
}, },
mounted() { mounted() {
if (document.cookie.indexOf('coscine.mergetoken') !== -1) {
window.location.href = this.mergeReturnUrl;
return;
}
this.getOrcidState(); this.getOrcidState();
}, },
props: { props: {
idpUrl: String, idpUrl: String,
loggedInWithShibboleth: Boolean, loggedInWithShibboleth: Boolean,
mergeReturnUrl: String,
}, },
methods: { methods: {
clickLogoutOrcid() { clickLogoutOrcid() {
......