Package ldaptor :: Package protocols :: Package ldap :: Module ldapclient :: Class LDAPClient
[hide private]
[frames] | no frames]

Class LDAPClient

source code

twisted.internet.protocol.Protocol --+
                                     |
                                    LDAPClient

An LDAP client

Instance Methods [hide private]
 
__init__(self) source code
 
dataReceived(self, recd) source code
 
connectionMade(self)
TCP connection has opened
source code
 
connectionLost(self, reason=protocol.connectionDone)
Called when TCP connection has been lost
source code
 
_send(self, op) source code
 
_cbSend(self, msg, d) source code
Deferred LDAPProtocolResponse
send(self, op)
Send an LDAP operation to the server.
source code
Deferred LDAPProtocolResponse
send_multiResponse(self, op, handler, *args, **kwargs)
Send an LDAP operation to the server, expecting one or more responses.
source code
 
send_noResponse(self, op)
Send an LDAP operation to the server, with no response expected.
source code
 
unsolicitedNotification(self, msg) source code
 
handle(self, msg) source code
 
bind(self, dn='', auth='') source code
 
_handle_bind_msg(self, msg) source code
 
unbind(self) source code
 
_cbStartTLS(self, msg, ctx) source code
 
startTLS(self, ctx=None)
Start Transport Layer Security.
source code
 
_startTLS(self, ctx) source code
Class Variables [hide private]
  debug = False
  berdecoder = pureldap.LDAPBERDecoderContext_TopLevel(inherit= ...
Method Details [hide private]

send(self, op)

source code 

Send an LDAP operation to the server.

Parameters:
  • op (LDAPProtocolRequest) - the operation to send
Returns: Deferred LDAPProtocolResponse
the response from server

send_multiResponse(self, op, handler, *args, **kwargs)

source code 

Send an LDAP operation to the server, expecting one or more responses.

Parameters:
  • op (LDAPProtocolRequest) - the operation to send
  • handler - a callable that will be called for each response. It should return a boolean, whether this was the final response.
  • args - positional arguments to pass to handler
  • kwargs - keyword arguments to pass to handler
Returns: Deferred LDAPProtocolResponse
the result from the last handler as a deferred that completes when the last response has been received

send_noResponse(self, op)

source code 

Send an LDAP operation to the server, with no response expected.

Parameters:
  • op (LDAPProtocolRequest) - the operation to send

bind(self, dn='', auth='')

source code 

Deprecated: Use e.bind(auth).

To Do: Remove this method when there are no callers.

startTLS(self, ctx=None)

source code 

Start Transport Layer Security.

It is the callers responsibility to make sure other things are not happening at the same time.

To Do: server hostname check, see rfc2830 section 3.6.


Class Variable Details [hide private]

berdecoder

Value:
pureldap.LDAPBERDecoderContext_TopLevel(inherit= pureldap.LDAPBERDecod\
erContext_LDAPMessage(fallback= pureldap.LDAPBERDecoderContext(fallbac\
k= pureber.BERDecoderContext()), inherit= pureldap.LDAPBERDecoderConte\
xt(fallback= pureber.BERDecoderContext())))