跨浏览器Windows表单注销?
寻找一种跨浏览器的方式来使用户从使用 Windows 身份验证的网页注销。
Looking for a cross-browser way to log a user off a webpage which uses windows authentication.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
关闭浏览器是我发现的唯一跨浏览器的方法。 这是我们不得不改用表单身份验证的原因之一。
Closing the browser is the only cross browser way I've found to do that. This is one of the reasons that we had to switch to using Forms authentication.
注销用户有什么意义? 您是否希望他们必须关闭浏览器并再次访问该网站并自动登录?
如果这只是纯粹的视觉假象,那么我会使用 cookie 来指示用户是否需要显示登录屏幕。 它与身份验证或授权无关,只是纯粹指示它们是否“登录”。
当他们注销并进入登录屏幕时会发生什么? 您是否希望他们当时必须输入凭据? “注销后登录”用户故事是什么?
What is the point of logging the user out? Do you want them to have to close the browser and go to the site again and be automatically logged in?
If it is just a purely visual fake out, then I would use a cookie to indicate if the user needs to be shown the login screen or not. It would have nothing to do with Authentication or Authorization, just purely an indicator of if they are "logged in".
What happens when they are logged off and go to the login screen? Do you want them to actually have to enter their credentials at that point? What is the "Log in after Log out" user story?
没有最终的解决方案。 这是所有类型的 www 身份验证的已知限制。
您可以发送虚假的未经授权的答案来再次请求密码。 这种方法可以帮助您模拟注销。
There is not an ultimate solution. This is a known limitation of all types of www authentications.
You can send a fake unauthorized answer to request password again. This approach may help you to simulate logoff.