RE: [PEAR] How to combine Auth with HTTP_Session

From: Date: Mon, 15 Dec 2003 11:13:08 +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-9523@lists.php.net to get a copy of this message
>Auth provides a setExpire() method. >Since version 1.2.3, you can set your >preferred session name, it should let you >share it with the other package. As far as I understand setExpire() is just for the authentication data and not for the session data. So even if isExpired() is the case the session data itself is not destroyed - it just causes a logout. But to share the session between both packages is a very good idea. Thanks! Regards, Torsten On Mon, 15 Dec 2003 11:33:57 +0100, Torsten Roehr wrote: > 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, > 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

« previous php.pear.general (#9523) next »