python-ntlm
python-ntlm copied to clipboard
Patch that adds IMAP NTLM authentication
trafficstars
Implemented a IMAPNtlmAuthHandler class for using NTML with IMAP.
Example:
from imaplib import IMAP4
from ntlm.IMAPNtlmAuthHandler import IMAPNtlmAuthHandler
imap = IMAP4("my.imap.server")
imap.authenticate("NTLM", IMapNtlmAuthHandler(r"DOMAIN\username", "password"))
Notes:
* I moved the base64 encoding/decoding to the HTTPNtlmAuthHandler.py module
* I only did the change for 2.6, not 3.0
Original issue reported on code.google.com by [email protected] on 8 Dec 2009 at 1:32
Attachments:
Forgot to set type when submitting. Should be Type-Enhancement. Don't know how
to
edit that. Project admin: Please edit the issue type.
Original comment by [email protected] on 8 Dec 2009 at 1:34
The patch needs a patch...
Forgot an import in HTTPNtlmAuthHandler.py:
diff --git a/HTTPNtlmAuthHandler.py b/HTTPNtlmAuthHandler.py
index 6983c48..22c3d70 100644
--- a/HTTPNtlmAuthHandler.py
+++ b/HTTPNtlmAuthHandler.py
@@ -16,6 +16,7 @@ import base64
import httplib, socket
from urllib import addinfourl
import ntlm
+import string
class AbstractNtlmAuthHandler:
def __init__(self, password_mgr=None, debuglevel=0):
Original comment by [email protected] on 8 Dec 2009 at 8:53
[deleted comment]
Check Issue 14 for updated patches if you have troubles patching.
Original comment by [email protected] on 21 Feb 2012 at 9:07