[Twisted-Python] Passport should be more async

Tommi Virtanen tv at twistedmatrix.com
Tue Oct 23 10:36:38 MDT 2001


        [Related to twisted.internet.passport,
        twisted.reality.plumbing, twisted.web.guard and
        twisted.words.ircservice]

	Passport, as it is now, cannot be used with real world
	authentication services such as LDAP and Radius. The primary
	reason seems to be that Identity.verifyPlainPassword() is
	assumed to be sync -- the usual LDAP config is such that
	hashed passwords cannot be retrieved from the server, but one
	can attempt to bind to a user entry with such a password. And
	that bind attempt is naturally async.

        The patch here mimics the Deferred usage in
        Authorizer.getIdentityRequest(), implementing a similar system
        with Identity.verifyPlainPassword(). I have also attempted to
        fix all callers, but I *really* need help with twisted.web.guard.

	Please give feedback.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: verifyPlainPassword-async.diff
URL: </pipermail/twisted-python/attachments/20011023/c0c22608/attachment.ksh>
-------------- next part --------------

-- 
tv@{{hq.yok.utu,havoc,gaeshido}.fi,{debian,wanderer}.org,stonesoft.com}
double a,b=4,c;main(){for(;++a<2e6;c-=(b=-b)/a++);printf("%f\n",c);}


More information about the Twisted-Python mailing list