It raises the 'Unauthorized' exception. This does not work with all browsers (IE in particular) and is not very user friendly because it pops up the authentication window, which must be cancelled in order to actually log out. You can however do it if you like. Calling it log out is a bit of a stretch IMHO. In a python script: raise 'Unauthorized' -Casey On Thursday 05 September 2002 11:32 am, Borislav wrote:
The default is basic auth, which has no intrinsic notion of logging out. If you install the CookieCrumbler product, that will let you use cookie auth and you will be able to log out users by expiring their cookies.
How is then Zope able to log me out of its management interface? I checked the frame source where the logout menu is:
<form action="/" method="POST" target="manage_main"> <span class="std-text">Logged in as <strong>admin</strong></span> <select class="form-element" name=":action"
onChange="window.parent.manage_main.location.href='/'+this.options[this.selectedIndex].value">
<option value="zope_quick_start">Zope Quick Start</option> <option value="manage_zmi_prefs">Set Preferences</option> <option value="manage_zmi_logout">Logout</option> </select> <input class="form-element" type="submit" name="submit" value=" Go " />
Is there a way to use the same facility from my scripts? It seems to me that logging out a user is a basic operation that should be supported by Zope 'out of the box', without the need of additional products. Just wondering...
--Borislav