cURL为什么不能与IIS7上的Windows身份验证一起使用? [英] Why doesn't cURL work with Windows Authentication on IIS7?

查看:85
本文介绍了cURL为什么不能与IIS7上的Windows身份验证一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问Windows身份验证背后的服务。我以为可以通过传递HTTP基本认证凭证的方式传递凭证,但是它不起作用。当我执行以下操作时,出现401错误,并且我完全确定密码正确。

I am trying to access a service that is behind Windows Authentication. I thought I could pass the credentials the way HTTP Basic Authentication credentials are passed, but it's not working. When I do the following, I get a 401 error, and I am absolutely sure the password is correct.

curl --user username:password http://example.com

为什么不起作用?

推荐答案

如果使用Windows身份验证,则需要使用NTLM:

If you are using Windows Authentication, you need to use NTLM:

curl --ntlm --user username:password http://example.com

这篇关于cURL为什么不能与IIS7上的Windows身份验证一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆