leocharre has asked for the wisdom of the Perl Monks concerning the following question:

I'm using CGI with cookies and apache basic authentication. I know, you can't log out.
But.. If your credentials change, you are essentially logged out. So.. I have that, someone can log out from this web app by very literally 'logging out' , entering their username/password again to log out.

Is there some code or suggestions out there to change the client credentials without their involvement?

  • Comment on how can I change apache basic auth credentials with perl?

Replies are listed 'Best First'.
Re: how can I change apache basic auth credentials with perl?
by Joost (Canon) on Aug 16, 2006 at 23:28 UTC
      I'm not sure why but back when I used basic auth I could never get that to work fully. The user had to press OK without a username and password filled in and then Cancel the next time the login box popped up.
Re: how can I change apache basic auth credentials with perl?
by sgifford (Prior) on Aug 17, 2006 at 02:44 UTC
    The easiest and most reliable way to do this is to use cookies instead of HTTP basic auth. Cookies can be used to accomplish basically the same thing as Basic Auth, except that you have a lot more control. See Apache::AuthCookie for an easy way to do this.
Re: how can I change apache basic auth credentials with perl?
by adrianh (Chancellor) on Aug 17, 2006 at 07:00 UTC