RE: [PEAR] How to combine Auth with HTTP_Session
| From: | Torsten Roehr | Date: | Mon, 15 Dec 2003 10:33:57 +0000 |
| Subject: | RE: [PEAR] How to combine Auth with HTTP_Session | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9520@lists.php.net to get a copy of this message | ||
Hi Stefan,
thanks for your answer. The problem is that Auth itself has a bit of session management as it starts
a session itself. Of course I could disable those functions in Auth and only use HTTP_Session for
proper session management. But I thought there is a convenient way to combine both packages as is
often the case with other PEAR packages. Also I don't want to change anything in the Pear
classes itself to make updating to newer versions as easy as possible.
If I do it the way you proposed how can I set a timelimit/lifetime fot the session? Ideally the Auth
package should provide those functions but it doesn't. Also I can't set a DB container for
the session data.
What do you think?
Thanks and best regards,
Torsten
-----Original Message-----
From: Stefan Neufeind [mailto:stefan@neufeind.net]
Sent: Monday, December 15, 2003 11:16 AM
To: pear-general@lists.php.net
Cc: Torsten Roehr
Subject: Re: [PEAR] How to combine Auth with HTTP_Session
On Mon, 15 Dec 2003 at 10:36:13, Torsten Roehr wrote:
> does anyone know how to easily combine PEAR::Auth with the HTTP_Session
> package? PEAR::Auth gives no control over how to store the session data
> (files, DB etc.) or to define the session lifetime itself (and therefore be
> able to destroy it).
Why can't you just check if there is an existing session (in which you also
store the user-rights etc.) and if there is not you try to Authenticate the
user via PEAR::Auth and create a session?
Regards,
Stefan
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php