有没有一种方法可以检查网站使用的身份验证类型? [英] Is there a way of checking what type of authentication a website is using?
问题描述
我正在尝试使用带有suds的python连接到Microsoft Exchange服务器,但是我无法验证和下载services.wsdl文件.
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.
我也尝试仅使用urllib2尝试连接,但这也失败了.但是,我可以进行身份验证并下载Outlook Web Access页面.
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.
我尝试使用ntlm auth,但这也给我一个401错误.有没有方法可以检查我需要哪种身份验证,因此我可以首先检查我是否使用了身份验证类型.
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.
谢谢
推荐答案
如 RFC 2617中所指定, WWW-Authenticate
响应标头"HTTP身份验证:基本和摘要访问身份验证" ,告诉您应在请求中使用哪种身份验证方法.
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.
这篇关于有没有一种方法可以检查网站使用的身份验证类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!