sessions with twisted.web

426 views Asked by At

I want to store a instance of ldap connection in a session var. I use request.getSession() but don't work correctly. My code:

session = request.getSession()

connect = LdapConnection(request.args['host'][0],'cn='+request.args['user'][0]+',ou=People,dc=Company',request.args['password'][0])

session.addComponent(LdapConnection,connect)

When I need the instance of ldapconnection, I want to recover but don't work :(

conect = session.getComponent(LdapConnection)
0

There are 0 answers