equal
deleted
inserted
replaced
264 session.close() |
264 session.close() |
265 |
265 |
266 def get_connection(self): |
266 def get_connection(self): |
267 """open and return a connection to the source""" |
267 """open and return a connection to the source""" |
268 if self._conn is None: |
268 if self._conn is None: |
269 self._connect() |
269 try: |
|
270 self._connect() |
|
271 except: |
|
272 self.exception('cant connect to ldap') |
270 return ConnectionWrapper(self._conn) |
273 return ConnectionWrapper(self._conn) |
271 |
274 |
272 def authenticate(self, session, login, password=None, **kwargs): |
275 def authenticate(self, session, login, password=None, **kwargs): |
273 """return CWUser eid for the given login/password if this account is |
276 """return CWUser eid for the given login/password if this account is |
274 defined in this source, else raise `AuthenticationError` |
277 defined in this source, else raise `AuthenticationError` |