[Twisted-web] accessing tls session from twisted web

Ilja Livenson ilja.livenson at gmail.com
Tue Mar 20 09:49:09 EDT 2012

Hi, all

I have a twisted web server, exposing https interface. What I'm trying
to do now is to support usage of two-way tls authentication and use
data from the client certificate as a seed for authenticated avatar.
Any hints as to how to do that in the best way? I guess it should be
done before Realm's requestAvatar method is called?

thanks for your input!


PS. Roughly speaking the code for that part looks like this:

wrapper = guard.HTTPAuthSessionWrapper(Portal(SimpleRealm(),
used_checkers), authn_methods)
reactor.listenSSL(8080, server.Site(resource=wrapper), contextFactory
= sslContext)

More information about the Twisted-web mailing list