Why doesn't cURL work with Windows Authentication on IIS7?

前端 未结 4 1262
春和景丽
春和景丽 2021-01-31 08:44

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

4条回答
  •  滥情空心
    2021-01-31 09:39

    You can also leave the username and password fields empty (-u :) and curl will use your current credentials from your environment:

    curl --ntlm -u : http://example.com
    

    Per the docs (under -u, --user)

    If you use a Windows SSPI-enabled curl binary and perform Kerberos V5, Negotiate, NTLM or Digest authentication then you can tell curl to select the user name and password from your environment by specifying a single colon with this option: "-u :".

    Kerberos-Enabled Binaries

提交回复
热议问题