On Fri, Jul 31, 2009 at 12:31 AM, Kevin Horn <[email protected]> wrote:
> the following classes: > > twisted.cred.credentials.CramMD5Credentials > twisted.mail.imap4.PLAINCredentials > twisted.mail.imap4.LOGINCredentials > > all seem to implement the same interface, yet there is no Interface defined > for these objects. > It would be great if there were such an interface. "But Kevin", you might be thinking, "They all implement > twisted.cred.credentials.IUsernameHashedPassword or > t.c.c.IUsernamePassword". That's true, but they all have additional methods > which make them useful for handling SASL authentication in various > protocols. And those methods aren't included in those interfaces. > Aaah, SASL. There has been *quite* a bit of discussion of this, which resulted in a branch that looked near completion but eventually stalled, here: http://twistedmatrix.com/trac/ticket/2015 I don't think that unifying this interface would *necessarily* require the resolution of this ticket, but it would at least be useful to see where things have been. So, should there be an Interface which describes the interface that these > objects implement? Sounds good to me, but then, I haven't done a lot of work with SASL. > And why are two of these in the IMAP package and the third in cred? Why > not in the same place? > LOGIN and PLAIN authentication methods were implemented specifically for IMAP, since as with all things IMAP it had special requirements. The general idea of hashed passwords was around before that in cred, but as you can see in the changeset that introduced it — http://twistedmatrix.com/trac/changeset/8290 — something was apparently (and, I suspect, naughtily) expecting to call moreChallenges and setResponse on an IUsernameHashedPassword.
_______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
