[Twisted-Python] Passport should be more async
![](https://secure.gravatar.com/avatar/0b90087ed4aef703541f1cafdb4b49a1.jpg?s=120&d=mm&r=g)
[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. -- 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);}
participants (1)
-
Tommi Virtanen