Re: AUTH - verifying authentication on later pages

From: Date: Fri, 02 Feb 2007 15:02:21 +0000
Subject: Re: AUTH - verifying authentication on later pages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26478@lists.php.net to get a copy of this message
--- Adam Ashley <aashley@adamashley.name> wrote: > On Thu, 1 Feb 2007 14:13:21 -0800 (PST), l > Burnerheimerton > <lburnerheimerton@yahoo.com> wrote: > > > It's been a while since I used AUTH and I have > > searched the pages and don't quite get the manual > on > > this one - although you would consider it a newbie > > question. > > > > Once they login and have all the sessions > assigned, on > > pages where they required to have logged in, I am > > simply manually checking to see > > $_SESSION['_authsession']['data']['variablename'] > is > > set and what it's equal to. (I set this after AUTH > has > > done it's session setting.) > > > > Is there a more secure way? What about > checkauth()? > > calling Auth::getAuth() or Auth::checkAuth() is the > correct way to do > it. If you don't then things like expiring, idle > checking and session > interception arent handled properly. > > If you don't want a page to be able to login only to > continue an > existing session set the 'allowLogin' option to > false. > > Adam Ashley Do you have, or know of any, examples for secondary pages where prior authentication is required while not having to put a login function on every page? What I am looking for, and I thought it existed already, was a quick two lines of code to put at the top of secured pages to check if the user had already authenticated using AUTH. If it does not exist and I have to add a login function to every page, where the real value of using AUTH - I am probably missing something here due to mey lack of experience with this package. Thanks for any help. ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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