确定浏览器是否支持Windows集成身份验证 [英] Determine if browser supports windows integrated authentication

查看:382
本文介绍了确定浏览器是否支持Windows集成身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法确定浏览器是否支持NTLM ,而是否为IIS中的特定站点或目录启用了NTLM,而没有显示登录对话框/弹出窗口?优选地,使用ColdFusion或JS和CF的某种组合来确定它。我不希望将此限制为IE,因为其他浏览器(例如FF)支持NTLM身份验证。

Is there a way to determine if a browser supports NTLM without having NTLM enabled for the particular site or directory in IIS and without showing a login dialog/pop-up? Preferably, determine this using ColdFusion or perhaps some combination of JS and CF. I'd prefer not to restrict this to just IE as other browsers (such as FF) support NTLM authentication.

推荐答案

如果你请求页面,页面返回401并说它只接受NTLM,然后浏览器发送另一个试图响应它的HTTP数据包,然后它支持NTLM。您不必让IIS执行此操作 - 您可以在任何页面上设置响应代码和标头请求NTLM。如果您没有收到其他请求,则表示客户端无法通过此方式进行身份验证。

If you request a page and the page returns 401 and says it only accepts NTLM, and then the browser sends another HTTP packet trying to respond to it, then it supports NTLM. You don't have to make IIS do this -- you could have any page where you can set the response codes and headers request NTLM. If you don't get another request, it means that the client couldn't authenticate this way.

您可以通过将此请求放入IFrame来检测客户端,然后在外页检查以查看iframe中发生的事情。

You could detect this on the client by putting this request in an IFrame, then in the outer page checking to see what happened in the iframe.

这篇关于确定浏览器是否支持Windows集成身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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