RE: [PHP-PEAR] HTTP authentication class for PEAR?
| From: | Colin Viebrock | Date: | Tue, 02 Jan 2001 17:25:54 +0000 |
| Subject: | RE: [PHP-PEAR] HTTP authentication class for PEAR? | ||
| References: | 1 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-757@lists.php.net to get a copy of this message | ||
> >I've got a class sitting around that does exactly this. Does
> someone feel
> >like PEAR-ifying it for me?
>
> If you post it to the list or send it directly to me
> I'll try to do it in the next days and commit it then.
Okay Martin, here you go. :) Apologies for the attachment.
Looking at my code again, it's got several elements including (ugh) some
javascript. It was kinda based on PHPLIB code, but I've added a bunch of
stuff, including remembering posted data, provided you are using sessions
and the authentication variable is registered. ie.:
require 'auth.inc';
session_start();
session_register('AUTH');
if (!isset($AUTH)) {
$AUTH = new Authentication;
}
$AUTH->doAuth('user');
I also use a database abstraction class -- not PEAR :( -- but you should
be able to figure everything out. If not, email me directly.
- Colin
Attachment: [application/octet-stream] auth.inc
Attachment: [application/octet-stream] auth.inc