开发者

Set credentials when using ntlm (kerberos) authentication

开发者 https://www.devze.com 2023-02-25 22:22 出处:网络
I have a c++ application which using NTLM authentication method (WinHttpSetOptio开发者_如何学Pythonn). what I\'m trying to do is to set the credentials, meaning: the NTLM uath is using the logged on c

I have a c++ application which using NTLM authentication method (WinHttpSetOptio开发者_如何学Pythonn). what I'm trying to do is to set the credentials, meaning: the NTLM uath is using the logged on credentials, I want to provide him the credentials myself (in domain\user format).

From the MSDN I see that the WinHttpSetCredentials doesn't affect.

Can someone help me please?


Take a look at WinHttpSetOption using WINHTTP_OPTION_AUTOLOGON_POLICY.

http://msdn.microsoft.com/en-us/library/aa384066.aspx#WINHTTP_OPTION_AUTOLOGON_POLICY

If you set the value to WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH, then it stops WinHttp from providing default credentials and you can set it yourself when you receive the proper 401/407 response using WinHttpSetCredentials.

0

精彩评论

暂无评论...
验证码 换一张
取 消