Skip to content
Open
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions lib/galaxy/webapps/galaxy/controllers/authnz.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def index(self, trans, **kwargs):

@web.json
@web.expose
def login(self, trans, provider, idphint=None, next=None):
def login(self, trans, provider, idphint=None, next=None, **kwargs):
if not trans.app.config.enable_oidc:
msg = "Login to Galaxy using third-party identities is not enabled on this Galaxy instance."
log.debug(msg)
Expand All @@ -90,7 +90,10 @@ def login(self, trans, provider, idphint=None, next=None):
trans.set_cookie(value="/", name=LOGIN_NEXT_COOKIE_NAME)
success, message, redirect_uri = trans.app.authnz_manager.authenticate(provider, trans, idphint)
if success:
return {"redirect_uri": redirect_uri}
if kwargs.get("redirect", None) == "true":
return trans.response.send_redirect(redirect_uri)
else:
return {"redirect_uri": redirect_uri}
else:
raise exceptions.AuthenticationFailed(message)

Expand Down
Loading