server/sources/ldapuser.py
changeset 3647 2941f4a0aab9
parent 3245 7ef021ac8dec
child 3720 5376aaadd16b
--- a/server/sources/ldapuser.py	Tue Oct 13 08:48:00 2009 +0200
+++ b/server/sources/ldapuser.py	Tue Oct 13 08:50:19 2009 +0200
@@ -237,14 +237,15 @@
             self._connect()
         return ConnectionWrapper(self._conn)
 
-    def authenticate(self, session, login, password):
+    def authenticate(self, session, login, password=None, **kwargs):
         """return CWUser eid for the given login/password if this account is
         defined in this source, else raise `AuthenticationError`
 
         two queries are needed since passwords are stored crypted, so we have
         to fetch the salt first
         """
-        assert login, 'no login!'
+        if password is None:
+            raise AuthenticationError()
         searchfilter = [filter_format('(%s=%s)', (self.user_login_attr, login))]
         searchfilter.extend([filter_format('(%s=%s)', ('objectClass', o))
                              for o in self.user_classes])