Search code examples
pythonurllib2exchangewebservicessuds

Is there a way of checking what type of authentication a website is using?


I'm trying to use python with suds to connect to a microsoft exchange server, but I can't authenticate and download the services.wsdl file.

I have also tried just using urllib2 to try and connect, but that also fails. I can however authenticate and download the Outlook Web Access page.

I've tried using ntlm auth, but that also gives me a 401 error. Is there are way of checking what type of authenication I need, so I can check if I was using the type of auth in the first place.

Thanks


Solution

  • As specified in RFC 2617, "HTTP Authentication: Basic and Digest Access Authentication", the WWW-Authenticate response header tells you which method of authentication you should use in your request.