when some authentication plugin fail, we may try another one stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 09 Mar 2010 19:57:47 +0100
branchstable
changeset 4855 e69b2f2f2d61
parent 4854 b06d2a3b27d9
child 4856 c8f887a5b2fa
when some authentication plugin fail, we may try another one
web/views/authentication.py
--- a/web/views/authentication.py	Tue Mar 09 19:57:04 2010 +0100
+++ b/web/views/authentication.py	Tue Mar 09 19:57:47 2010 +0100
@@ -114,8 +114,11 @@
                 login, authinfo = retreiver.authentication_information(req)
             except NoAuthInfo:
                 continue
-            cnx = self._authenticate(req, login, authinfo)
-            break
+            try:
+                cnx = self._authenticate(req, login, authinfo)
+                break
+            except ExplicitLogin:
+                continue # the next one may succeed
         else:
             raise ExplicitLogin()
         for retreiver_ in self.authinforetreivers: