如何注销在Google Chrome中可用的HTTP身份验证(htaccess)? [英] How to logout of an HTTP authentication (htaccess) that works in Google Chrome?

查看:139
本文介绍了如何注销在Google Chrome中可用的HTTP身份验证(htaccess)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Firefox和IE提供了一个解决方案,但是我没有找到针对Google Chrome的任何解决方案。



有没有办法在Google Chrome中执行此操作?

解决方案

我知道这是一个非常旧的帖子...我的意思是像现在5年friggin,但我只是找到了一个很好的解决方案。

在您的受保护文件夹中创建另一个文件夹,我们称之为注销。在这里放置与您的受保护文件夹中相同的.htaccess文件,除非稍作修改。
而不是:

 需要有效用户

现在写入:

$ p $ 要求用户EXIT

code>

并确保您没有名为exit的用户! :D



在您的保护区域中,您的注销链接或按钮或其他内容应将用户重定向到以下地址:example.com/protectedFolder/logout



浏览器通常只能保持一个用户从一个站点名称或领域名称登录...登录尝试用户Exit将覆盖所有内容,因此最初登录的用户,必须再次登录到保护区。



但是,一如既往,我可能是错的,您仍然应关闭所有浏览器窗口,然后重新启动计算机如果你想确定的话! :)
另外,如果你告诉你的用户会发生什么事,什么时候会发生,什么时候会注销,那么它不会受到伤害!



我测试过这个在铬和在Internet Explorer 11中(不会在边缘工作,也可能不是其他人)
解决方案在这里找到:
https://www.mavensecurity.com/media/BasicAuthLogOut.pdf


I got a solution for Firefox and IE but I didn't find any solution for Google Chrome.

Is there a way to do it in Google Chrome?

解决方案

I know it's a really old post... I mean like friggin 5 years now, but I just found a somewhat good solution.

Inside your protected folder, create another folder, let's call it "logout". Place the same .htaccess file in here as you have in your protected folder, except with a small modification. instead of:

Require valid-user

now write:

Require user EXIT

And make sure, you don't have a user named exit! :D

In your protected area, your logout link or button or whatever, should redirect the user to this address: example.com/protectedFolder/logout

The browsers usually are able to keep only one user logged in from one site name or realm name... the sign in attempt for the user Exit will overwrite everything, thus the originally logged in user, would have to log in again to the protected area.

But as always, I might be wrong, and you should still close all your browser window, and restart the computer if you want to be sure! :) Also, it wouldn't hurt, if you would tell your users what is going to happen, when they hit logout!

I have tested this in chrome and in internet explorer 11.(will not work in edge, and maybe others neither) The solution was found here: https://www.mavensecurity.com/media/BasicAuthLogOut.pdf

这篇关于如何注销在Google Chrome中可用的HTTP身份验证(htaccess)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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