AuthDBI log out is it possible

AuthDBI log out is it possible

am 18.01.2008 19:24:36 von joe

Hello I am using AuthDBI in my apache server, is there a way to code a
log out button? thanks.

Re: AuthDBI log out is it possible

am 18.01.2008 20:06:17 von Joost Diepenmaat

joe writes:

> Hello I am using AuthDBI in my apache server, is there a way to code a
> log out button? thanks.

/As far as I know/ you can't force a log out from basic authentication
from the server. Clients will usually remember the login credentials
until they're restarted.

Joost.

Re: AuthDBI log out is it possible

am 22.01.2008 19:04:48 von joe

Thanks Joost. I guess there is no way to log out. I tried a few php
authentication script with no luck. Now I was asked if it possible to
have a session life. I did not find any settings for this in the
AuthDBI.pm file and suggestions? Thanks

On Jan 18, 2:06 pm, Joost Diepenmaat wrote:
> joe writes:
> > Hello I am using AuthDBI in my apache server, is there a way to code a
> > log out button? thanks.
>
> /As far as I know/ you can't force a log out from basic authentication
> from the server. Clients will usually remember the login credentials
> until they're restarted.
>
> Joost.

Re: AuthDBI log out is it possible

am 22.01.2008 19:29:22 von glex_no-spam

joe wrote:
> Thanks Joost. I guess there is no way to log out. I tried a few php
> authentication script with no luck.

Please don't top post.

You might be able to force the "logout" by sending a 401 Unauthorized
header. Here's what I've used in the past.


sub unauth_header
{
my $realm = shift;

print "HTTP/1.0 401 Unauthorized\n";
print "401 Unauthorized\n";
print "WWW-Authenticate: Basic realm=\"$realm\"\n\n";
}

> Now I was asked if it possible to
> have a session life. I did not find any settings for this in the
> AuthDBI.pm file and suggestions? Thanks

Sure, you could store the date/time it expires and check it, or
have something else that removes the session after X
minutes/days, however you do have to use sessions first, which
isn't part of AuthDBI. You could either write your own or
use one of the many session modules available from CPAN.