使用 ldap 凭据进行 curl 身份验证

curl authentication with ldap credentials

我正在尝试使用使用 ldap 身份验证的 curl 连接到 servicenow 服务器。

我的命令:

curl -ntlm -u user https://my.service-now.com/api/now/table/incident

然后我得到:

Enter host password for user 'user':
{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"},"status":"failure"}

如何通过curl命令获取身份验证?

您可以试试这个来验证:

curl -ntlm "https://my.service-now.com/api/now/table/incident" --user 'user':'user_password'

替换为您的用户名和密码以执行它