Re: AUTH - verifying authentication on later pages
| From: | Justin Patrin | Date: | Fri, 02 Feb 2007 16:17:33 +0000 |
| Subject: | Re: AUTH - verifying authentication on later pages | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26479@lists.php.net to get a copy of this message | ||
On 2/2/07, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote:
--- Adam Ashley <aashley@adamashley.name> wrote: On Thu, 1 Feb 2007 14:13:21 -0800 (PST), l Burnerheimerton <lburnerheimerton@yahoo.com> wrote:getAuth() checkAuth() -- Justin PatrinIt's been a while since I used AUTH and I have searched the pages and don't quite get the manualonthis one - although you would consider it a newbie question. Once they login and have all the sessionsassigned, onpages where they required to have logged in, I am simply manually checking to see $_SESSION['_authsession']['data']['variablename']isset and what it's equal to. (I set this after AUTHhasdone it's session setting.) Is there a more secure way? What aboutcheckauth()? 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.