Skip to content

Commit

Permalink
added redirect logic for fence idp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramu Nerella authored and Ramu Nerella committed Aug 18, 2021
1 parent 3ac24f5 commit fc072a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fence/blueprints/login/fence_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ def get(self):
)
self.post_login()

if config["REGISTER_USERS_ON"]:
if not flask.g.user.additional_info.get("registration_info"):
return flask.redirect(
config["BASE_URL"] + flask.url_for("register-user.register_user")
)

if "redirect" in flask.session:
return flask.redirect(flask.session.get("redirect"))
return flask.jsonify({"username": username})

0 comments on commit fc072a0

Please sign in to comment.