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

Class LDAPClient

BaseProtocol --+    
               |    
        Protocol --+
                   |
                  LDAPClient


An LDAP client
Method Summary
  __init__(self)
  bind(self, dn, auth)
  connectionLost(self, reason)
Called when TCP connection has been lost
  connectionMade(self)
TCP connection has opened
  dataReceived(self, recd)
  handle(self, msg)
Deferred LDAPProtocolResponse send(self, op)
Send an LDAP operation to the server.
Deferred LDAPProtocolResponse send_multiResponse(self, op, handler, *args, **kwargs)
Send an LDAP operation to the server, expecting one or more responses.
  send_noResponse(self, op)
Send an LDAP operation to the server, with no response expected.
  startTLS(self, ctx)
Start Transport Layer Security.
  unbind(self)
  unsolicitedNotification(self, msg)
  _cbSend(self, msg, d)
  _cbStartTLS(self, msg, ctx)
  _handle_bind_msg(self, msg)
  _send(self, op)
  _startTLS(self, ctx)
    Inherited from BaseProtocol
  makeConnection(self, transport)
Make a connection to a transport and a server.

Class Variable Summary
LDAPBERDecoderContext_TopLevel berdecoder = <LDAPBERDecoderContext_TopLevel identities=...
bool debug = False
    Inherited from Protocol
Implements __implemented__ = <implementedBy twisted.internet.protoc...
_implementsTuple __implements__ = (<MetaInterface twisted.internet.interf...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    Inherited from BaseProtocol
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
int connected = 0                                                                     
NoneType transport = None                                                                  

Method Details

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

Depreciated: Use e.bind(auth).

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

connectionLost(self, reason=<twisted.python.failure.Failure twisted.internet.error.Co...)

Called when TCP connection has been lost
Overrides:
twisted.internet.protocol.Protocol.connectionLost

connectionMade(self)

TCP connection has opened
Overrides:
twisted.internet.protocol.BaseProtocol.connectionMade

send(self, op)

Send an LDAP operation to the server.
Parameters:
op - the operation to send
           (type=LDAPProtocolRequest)
Returns:
the response from server
           (type=Deferred LDAPProtocolResponse)

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

Send an LDAP operation to the server, expecting one or more responses.
Parameters:
op - the operation to send
           (type=LDAPProtocolRequest)
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:
the result from the last handler as a deferred that completes when the last response has been received
           (type=Deferred LDAPProtocolResponse)

send_noResponse(self, op)

Send an LDAP operation to the server, with no response expected.
Parameters:
op - the operation to send
           (type=LDAPProtocolRequest)

startTLS(self, ctx=None)

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

berdecoder

Type:
LDAPBERDecoderContext_TopLevel
Value:
<LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallbac\
k=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LD\
APControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBind\
Request, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSe\
archRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, \
0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddReques\
t, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse,\
 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPRefe\
...                                                                    

debug

Type:
bool
Value:
False                                                                  

Generated by Epydoc 2.1 on Wed May 3 13:51:15 2006 http://epydoc.sf.net