当设置我的owin self托管投影时,我想将其设置为使用Windows域进行身份验证。据我所知,这是通过协商协议执行的,在协议中它会尝试使用Kerberos并在不可用的情况下返回到NTLM。我在网上看了一下,代码片段看起来像这样IntegratedWindowsAuthentication vs Negotiate有什么区别?
public void Configuration(IAppBuilder app)
{
HttpListener listener =
(HttpListener)app.Properties["System.Net.HttpListener"];
listener.AuthenticationSchemes =
AuthenticationSchemes.IntegratedWindowsAuthentication;
...
}
虽然我发现了AuthenticationSchemas
枚举。枚举是一个标志枚举,但我试图打开集成的窗口和协商之间的区别是什么?两者似乎都提供了Kerberos和对NTLM的故障回复。为什么我会使用其中一个或另一个?文件对这件事不是很有帮助。
这将是很好,但在这个枚举的上下文有什么区别?为什么他们有不同的标志值(6 vs 2)。将它设置为Negotiate,我得到挑战周期,我的响应'www-authenticate'标题读取Negotiate,第二个'www-authenticate'是Negotiate,随后是base64标签。 – 2014-11-03 20:44:19