diff --git a/lib/galaxy/webapps/galaxy/controllers/authnz.py b/lib/galaxy/webapps/galaxy/controllers/authnz.py index 659abc82017..0a07dbbba3a 100644 --- a/lib/galaxy/webapps/galaxy/controllers/authnz.py +++ b/lib/galaxy/webapps/galaxy/controllers/authnz.py @@ -4,7 +4,6 @@ OAuth 2.0 and OpenID Connect Authentication and Authorization Controller. from __future__ import absolute_import -import json import logging from galaxy import exceptions @@ -17,6 +16,7 @@ log = logging.getLogger(__name__) class OIDC(JSAppLauncher): + @web.json @web.expose @web.require_login("list third-party identities") def index(self, trans, **kwargs): @@ -37,6 +37,7 @@ class OIDC(JSAppLauncher): rtv.append({'id': trans.app.security.encode_id(authnz.id), 'provider': authnz.provider}) return rtv + @web.json @web.expose def login(self, trans, provider): if not trans.app.config.enable_oidc: @@ -45,7 +46,7 @@ class OIDC(JSAppLauncher): return trans.show_error_message(msg) success, message, redirect_uri = trans.app.authnz_manager.authenticate(provider, trans) if success: - return json.dumps({"redirect_uri": redirect_uri}) + return {"redirect_uri": redirect_uri} else: raise exceptions.AuthenticationFailed(message)