[Zope] logout from basic authentication ... almost
Hello, On the archive i got the way to logout from the basic authentication. i have DTML method called "logout" with only : dtml-raise Unauthorized H1Logout requested. OK/H1 /dtml-raise Calling the logout method calls the authenticated window. And i can give a new id/pass. So login as a new user works fine. But if i only want to became Anonymous again, when i click on the CANCEL button, i have theH1Logout requested. OK/H1 message at the end of the regular traceback with the Unauthorized error.. I tried to modify my standard_error_message to catch it but with no luck (i still catch other errors within my standard_error_message for generate a clean page). Anyone succeeded in generating a clean "you've been logout" page with this method ? Didier. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] logout
I saw this little bit posted in the mailinglist archives: dtml-raise Unauthorized /dtml-raise I made a DTML method with just these two lines in it. Of course when I call it I get into a recursive *logout - login and call this method again - logout - login and call this method again ...* loop. What is the cleanest way to avoid this? Thanks, ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] logout
Hi James, 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. often prependig the url with the new user like this: http://newuser@site/... logs you out and in as the new user. But this behavior is not defined as in rfc. HTH Tino Wildenhain ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] logout
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 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )