473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

PEAR Auth - check on each page

I have a framework working where I have multiple pages each checking the
authentication status.

Unauthorised users are redirected to a login page - otherwise the requested
page is shown.
Now my question is just to get a little clarification.

On the login page I create and object of type Auth
$a = new Auth("MDB2", $options, "loginFunction");

and then run

$a->start();

Fine so far.

Now at the top of the each authorised-only page I create a new Auth object
and then check the auth status.

$a = new Auth("MDB2");

if (!$a->checkAuth()) {

HTTP::redirect("login.php");
}

My question is that the new Auth object - $a - can be created with *any*
parameters. It could even be:

$a = new Auth("DB");

And the check works fine.

Do I take it that the Auth object only needs the correct container and
options set up when it runs the start() method? If the name/password come
back in as POSTED correctly then start() will create session variables.

And I take it that these session variables can then be checked by any old
invocation of Auth?

Thanks for any clarification,

Kevin

Oct 13 '06 #1
0 1538

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: NotGiven | last post by:
Ok, I THINK I have access to the PEAR packages in my /path/to/pear/... directory. I tested a simple php page with just : require("/path/to/pear/Mail.php"); and the page displayed properly so I...
1
by: L'astemio | last post by:
hi all i must send a mail from a php form. ok. i have pear installed. ok. this is my code: <? include("Mail.php"); $recipients = "info@domain.com"; $headers = "info@domain.com";
6
by: Jon | last post by:
If a session times out, but the forms auth is still logged in it's possible for users to go to pages on the site that need those session variables. I was under the impression that using forms auth...
0
by: lacenaepronta | last post by:
HI, I use PEAR::Auth module to login my users. I noticed the lack of the 'remember me' feature (and the method 'setExpire' isn't enough). So I wonder HOW can I extend this package and...
3
by: Thomas.Firnschrott | last post by:
i have a problem concerning a php script i worte some time ago. It is a rather simple thing. On a Site you login via a html form which points to a php that checks the username and password, and...
0
by: Mike Wasilewski | last post by:
I am just setting up a win 2003 server running IIS6 , php, with pear packages installed. I am trying to get the Pear Mail package working but cannot get it to send a message and it returns no...
1
by: kevin bailey | last post by:
I have used the PEAR Auth package to successfully set up authentication. <code> // Details of where the authentication details are stored. $options = array( 'dsn'...
1
by: slowpoke115 | last post by:
I have a simple login page with 2 fields (email and password), these details are then sent to another page which processes the inputs and sends them off to a PEAR server and awaits a response, it...
3
by: hakan | last post by:
I've started playing with the Auth module, and I have a quick question before I go any deeper. Is it possible to embedd the Auth login form in an HTML page? I would like to put a login form in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.