You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to write code like this.
Note that I don't specify username and password.
I want to make a request using NTLM authentication with the credentials of the
user making the call.
This should in theory be pretty easy to do (not easy for me though). I think
there are some clues in this post
http://stackoverflow.com/questions/2916396/smtp-through-exchange-using-integrate
d-windows-authentication-ntlm-using-python
--- snip ---
import urllib2
from ntlm import HTTPNtlmAuthHandler
url = "http://ntlmprotectedserver/securedfile.html"
# create the NTLM authentication handler
# since we aren’t passing a password manager, use credentials
# of calling user
auth_NTLM = HTTPNtlmAuthHandler.HTTPNtlmAuthHandler()
# create and install the opener
opener = urllib2.build_opener(auth_NTLM)
urllib2.install_opener(opener)
# retrieve the result
response = urllib2.urlopen(url)
print(response.read())
Original issue reported on code.google.com by [email protected] on 28 Sep 2010 at 11:16
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 28 Sep 2010 at 11:16The text was updated successfully, but these errors were encountered: