-   Linux - Server (
-   -   How to authenticate users in Apache using a cookie? (

Felipe 04-11-2012 06:30 PM

How to authenticate users in Apache using a cookie?
I want to authenticate a user based on a cookie using Apache:
For accessing a url, I request a cookie. That cookie identifies the users:

The cookie "userAuthentication" contains the "username", the time the cookie was create and a hash function to ensure validity of the cookie.

The first time the user connects the url, the cookie is verified (checks that the hash is generated from username@creation-time). But the rest of the times that verification is not needed.

Can any tell me what modules do I have to use and an idea of how can it be done?


CTM 04-11-2012 08:57 PM

I can't vouch for any of these, but you might want to consider mod_auth_tkt or mod_auth_cookie_mysql2/mod_auth_cookie_pgsql2.

Felipe 04-12-2012 05:05 AM

Thanks, I think it's what I was looking for, but I've to try it.

All times are GMT -5. The time now is 05:38 AM.