Skip to content

Commit

Permalink
feat(incommon): fix redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudyard Richter committed Jun 28, 2019
1 parent d954728 commit f4eac46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fence/blueprints/login/shib.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ def get(self):
# https://wiki.shibboleth.net/confluence/display/SP3/SSO
entityID = flask.request.args.get("shib_idp")
flask.session["entityID"] = entityID
actual_redirect = config["BASE_URL"] + "/login/shib/login"
if not entityID:
# default to SSO_URL from the config which should be NIH login
actual_redirect = config["BASE_URL"] + "/login/shib/login"
return flask.redirect(config["SSO_URL"] + actual_redirect)
return flask.redirect(
config["BASE_URL"] + "/Shibboleth.sso/Login?entityID={}".format(entityID)
config["BASE_URL"] + "/Shibboleth.sso/Login?entityID={}&target={}"
.format(entityID, actual_redirect)
)


Expand Down

0 comments on commit f4eac46

Please sign in to comment.