[Zope] How to logout users when using LoginManager?
Chris Withers
chrisw@nipltd.com
Wed, 30 Aug 2000 13:48:15 +0100
Brad Clements wrote:
> Can anyone share some tips on how to logout users from a web page,
> using cookies or otherwise, allowing them to relogin as another user
> without having to quit/start their browser?
Well, with cookies, it's simple: delete the cookie. I think most fo the
Login-type stuff has interfaces to do this for you (like the logout link
on zope.org)
With Basic Auth it's a bit tricky. Basic Auth really only works 'cos
browsers cache your username and password and send it each time you
request a new page that it thinks those details apply to. So you just
have to persuade the browser to stop cachign that info ;-)
I think you can do something like:
<dtml-raise Unauthorized>
which works on most of the browsers around. I don't know though, maybe I
got the syntax wrong :S
cheers,
Chris