-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth: CRAM-MD5 #52
Comments
CRAM-MD5 is already implemented in the standard library. I added an example to make it clear how to use it with Gomail. |
Thank you, that's quite easy :) |
Also deprecated NewPlainDialer() in favor of NewDialer(). Fixes #52
I just added the automatic support of CRAM-MD5. You should now be able to remove the Send method in Gogs. The only setting that is not supported in Gomail is the |
Great, thanks! :) I found some code (in smtp.go?) that says something like
Is this redundant in gomail if the smtp package calls it? |
The |
Hi,
as far as I understood your code you implement the smtp.Auth interface which is then used by the smtp package when calling c.Auth().
In auth.go you implement LOGIN and PLAIN mechanisms. Have you ever thought about implementing CRAM-MD5?
You would have to return CRAM-MD5 in Auth.Send, listen for the base64 encoded challenge in Auth.Next, decode it and return (base64 encoded) the username and a MD5 response à la
digest = MD5(('password' XOR opad), MD5(('password' XOR ipad), challenge))
.Details can be found in this Tutorial and RFC 2195.
The text was updated successfully, but these errors were encountered: