Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1551-Make Use of RedirectPage Logic #3910

Closed
wants to merge 2 commits into from
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;
}