This talks about solutions to the problem that HTTP Authentication provides inadequate logout facilities.
For the worried user, the Mozilla/Firefox/Seamonkey plugin called Web Developer [9]. It has an option for clearing HTTP authentication (click "Miscellaneous", then "Clear Private Data", then "Clear HTTP Authentication").
Things that have helped in the past include the following:
The response would look something like this:
HTTP/1.0 401 Unauthorized WWW-Authenticate: Invalid
Set up a reserved invalid username (called "invalid" or "reset", or something). Set the password to (if possible) one that will never work, or (if necessary) one that will never be used. For example, say you set the username on the server to "invalid", and were unfortunately forced to set the password to "jE#9Bt!q" (rather than something that will never work). You would redirect to the username "invalid", with the password "invalid". This would mean that the user was logged out, but would unfortunately present them with another username/password prompt.
See Authenticate with Logout [12] for details. This may only work in Mozilla-related browsers.
The javascript would look something like this:
try {
document.execCommand("ClearAuthenticationCache");
} catch (exception) {
}
The final page should:
Mr. Charles Miller, in his article Saving HTTP Authentication [13], suggests that the HTTP RFC be altered to:
I'd also suggest that the server be able to send the browser a "Log out" command via headers.
Links:
[1] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc0
[2] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc1
[3] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc2
[4] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc3
[5] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc4
[6] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc5
[7] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc6
[8] http://computerstuff.jdarx.info/content/inadequate-logout-functionality-http-authentication#toc11
[9] http://webdeveloper.mozdev.org/
[10] http://dolphinling.net/firefox/httpauthui
[11] http://blog.dolphinling.net/2005/04/http-authentication-logoutstop-phishing/
[12] http://www.jonasjohn.de/snippets/php/authenticate-with-logout.htm
[13] http://fishbowl.pastiche.org/2003/12/30/saving_http_authentication