From dca76c37a5bc6172bbe8491875a3cea36af5b4b7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 15 2016 10:54:56 +0000 Subject: Support regular openid backend With the regular openid backend you can point pagure to a specific openid server and it won't check if the user has signed the FPCA but it will ask for the groups to the server (if this one supports this extension). --- diff --git a/pagure/__init__.py b/pagure/__init__.py index 327fbae..ff5a00e 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -278,7 +278,7 @@ def auth_login(): # pragma: no cover else: # pragma: no cover admins = set(admins) - if APP.config.get('PAGURE_AUTH', None) == 'fas': + if APP.config.get('PAGURE_AUTH', None) in ['fas', 'openid']: return FAS.login(return_url=return_point, groups=admins) elif APP.config.get('PAGURE_AUTH', None) == 'local': form = pagure.login_forms.LoginForm() @@ -300,7 +300,7 @@ def auth_logout(): # pragma: no cover if not authenticated(): return flask.redirect(return_point) - if APP.config.get('PAGURE_AUTH', None) == 'fas': + if APP.config.get('PAGURE_AUTH', None) in ['fas', 'openid']: if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: FAS.logout() flask.flash("You are no longer logged-in")