<div class="gmail_quote">On Fri, Jul 31, 2009 at 12:31 AM, Kevin Horn <span dir="ltr">&lt;<a href="mailto:kevin.horn@gmail.com">kevin.horn@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
the following classes:<br><br>twisted.cred.credentials.CramMD5Credentials<br>twisted.mail.imap4.PLAINCredentials<br>twisted.mail.imap4.LOGINCredentials<br><br>all seem to implement the same interface, yet there is no Interface defined for these objects.<br>

</blockquote><div><br>It would be great if there were such an interface.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&quot;But Kevin&quot;, you might be thinking, &quot;They all implement twisted.cred.credentials.IUsernameHashedPassword or t.c.c.IUsernamePassword&quot;.  That&#39;s true, but they all have additional methods which make them useful for handling SASL authentication in various protocols.  And those methods aren&#39;t included in those interfaces.<br>

</blockquote><div><br>Aaah, SASL.  There has been <i>quite</i> a bit of discussion of this, which resulted in a branch that looked near completion but eventually stalled, here:  <a href="http://twistedmatrix.com/trac/ticket/2015">http://twistedmatrix.com/trac/ticket/2015</a><br>
<br>I don&#39;t think that unifying this interface would <i>necessarily</i> require the resolution of this ticket, but it would at least be useful to see where things have been.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So, should there be an Interface which describes the interface that these objects implement?</blockquote><div><br>Sounds good to me, but then, I haven&#39;t done a lot of work with SASL. <br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
And why are two of these in the IMAP package and the third in cred?  Why not in the same place?<br></blockquote><div> <br>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 — <a href="http://twistedmatrix.com/trac/changeset/8290">http://twistedmatrix.com/trac/changeset/8290</a> — something was apparently (and, I suspect, naughtily) expecting to call moreChallenges and setResponse on an IUsernameHashedPassword.<br>
<br></div></div>