Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/webapp/resources/js/shib/idpselect_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ function IdPSelectUIParms() {
// this.defaultReturn = null; // If non null, then the default place to send users who are not
// Approaching via the Discovery Protocol for example
//this.defaultReturn = "https://example.org/Shibboleth.sso/DS?SAMLDS=1&target=https://example.org/secure";

if (window.location.href.search("redirectPage") > 0){
redirectStr = urlParam('redirectPage');
shibRedirectPage = encodeURIComponent("?redirectPage=" + redirectStr);
}

this.defaultReturn = window.location.protocol + "//" + window.location.hostname + "/Shibboleth.sso/Login?SAMLDS=1&target=" + window.location.protocol + "//" + window.location.hostname + "/shib.xhtml" + shibRedirectPage;
this.defaultReturnIDParam = null;
Expand Down Expand Up @@ -139,3 +144,9 @@ function IdPSelectUIParms() {
this.maxHeight = 69;
this.bestRatio = Math.log(80 / 60);
}

function urlParam(name) {
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
//Returns the value for the specified parameter, or 0 if the parameter is not found in the url string
return results[1] || 0;
}