Re: [Phplib-users] Two different auth classes in the same web site
Brought to you by:
nhruby,
richardarcher
|
From: Virilo T. <vi...@su...> - 2003-10-24 00:42:04
|
Thanks you very much!
Yes, i just have replaced the battery this morning. I've stayed living in
the past!
> This is simple to achieve in 3 steps:
> 1. define your 2 auth extension classes
> 2. make sure the separate classes use separate tables (or otherwise
> prevent a customer from authenticating as admin)
> 3. make sure the page_open() on customer pages sets "auth" =>
> "Customer_Auth" and on admin pages sets "auth" => "Admin_Auth"
I've thought the same, I have already write my "Customer_Auth", but im not
sure if it was a good idea use the same phplib with different tables because
both auth classes will use the same sess class and table.
I have to read 'auth.inc'.
Greetings,
Virilo Tejedor. Email: vi...@su...
----- Original Message -----
From: "Layne Weathers" <la...@dr...>
To: <php...@li...>
Sent: Thursday, October 23, 2003 9:33 PM
Subject: Re: [Phplib-users] Two different auth classes in the same web site
On Thursday, October 23, 1997, at 12:15 PM, Virilo Tejedor wrote:
Your system clock appears to be 6 years behind.
> I have an auth subclass called 'Customer_Auth' and i need another
> subclass (i.e. Admin_Auth) for admins.
> These classes have differents behaviors: ill never let anybody
> autoregister in Admin_Auth or visit as user 'nobody'.
>
> These classes also will have differents tables in the database.
>
> I havent thought if its better have two phplib copies, or one copy for
> both classes. In the second case, Im not sure if somebody could
> authenticate in customer pages and appears like authenticated because
> both classes uses the same session class (and table).
This is simple to achieve in 3 steps:
1. define your 2 auth extension classes
2. make sure the separate classes use separate tables (or otherwise
prevent a customer from authenticating as admin)
3. make sure the page_open() on customer pages sets "auth" =>
"Customer_Auth" and on admin pages sets "auth" => "Admin_Auth"
Layne
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Phplib-users mailing list
Php...@li...
https://lists.sourceforge.net/lists/listinfo/phplib-users
|