Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
how do i ... implement a log-out with txp:password_protect?
hi there,
i m using txp:password_protect and was wondering whether it was possible to log out of a password protected site afterwards?
cheers,
-funtoosh
Offline
Re: how do i ... implement a log-out with txp:password_protect?
mhm, the following seems to work: i am using a log-out that links to a page with a different password – if the user declines to enter a password here, a 401 is produced, and the user is effectively unlogged from all pages.
it s a bit of a workaround, but seems to do for a now, i m not sure if it works on all browsers though.
any better ideas?
thanx,
-funtoosh
Offline
#3 2006-12-17 20:18:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do i ... implement a log-out with txp:password_protect?
http://httpd.apache.org/docs/1.3/howto/auth.html#logout
If that ability is important, recommended that you use a plugin.
Offline
Re: how do i ... implement a log-out with txp:password_protect?
hi mary,
mary schrieb:
yep, that’s weird, log out is not supported. still i googled a number of php-scripts that force a log out in one way or another. i suppose that s what the two txp-plugins use, too? since they appear to be using http_auth, too.
but for now, the “401-kills-session” trick will make do for the users of my site in question. or so i hope ;-)
merci,
-funtoosh
Offline
#5 2006-12-17 21:11:16
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: how do i ... implement a log-out with txp:password_protect?
…php-scripts that force a log out in one way or another.
Yes, what they would do is force a reset of the server auth variables. Properly supporting that in the core would be somewhat of a hassle (at least for the 4.0.x line). HTTP Basic Auth is really best for users that will be accessing from private computers.
I don’t believe the plugins use HTTP Basic Auth, but cookies (like the Txp admin login uses).
Offline