[Zope] logout

Michel Pelletier michel@digicool.com
Fri, 09 Jun 2000 21:42:01 -0700


James Cummings wrote:
> 
> Ok, since I haven't found this by searching the site or the mailing list
> archive, is it possible to logout as superuser? I would like to be able to
> login as a different user, but I haven't been able to find out how to do this.

This question comes up every now and then and the answer is Yes, and
No.  To logout, close your browser.

You might think that sucks but there is nothing Zope can do about it,
HTTP is a stateless protocol, you are never really 'logged in', but
rather your browser caches your authentication information and provides
it to Zope for *every* request to a protected resource.  There are a
couple of things you can do:

<dtml-raise Unauthorized>
</dtml-raise>

Will cause your browser to pop up a new login box, here you can either
re-login as someone else or hit 'Cancel' and your browser *should* clear
it's authentication cache.

An alternative is that you can engineer a cookie based solution.

-- 

-Michel Pelletier

http://www.zope.org/Members/michel/MyWiki

Visit WikiCentral for the latest Zen:

http://www.zope.org/Members/WikiCentral