server/sources/ldapuser.py
branchstable
changeset 4556 43c14e0e8972
parent 4555 8968c50818db
parent 4252 6c4f109c2b03
child 4716 55b6a3262071
--- a/server/sources/ldapuser.py	Fri Feb 12 12:57:14 2010 +0100
+++ b/server/sources/ldapuser.py	Fri Feb 12 12:57:56 2010 +0100
@@ -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])