RE: [PHP] Again, what is the concensus for authentication?
| From: | Jon Haworth | Date: | Thu, 17 Oct 2002 16:25:30 +0000 |
| Subject: | RE: [PHP] Again, what is the concensus for authentication? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120356@lists.php.net to get a copy of this message | ||
Hi,
Please don't post HTML.
Please don't use all caps (especially in your disclaimer), it's giving me a
headache :-)
> HTTP authentication?
> Cookies...and milk ?
> Server Side ?
>
> Combination?
My 2p:
If you have a simple "foo is protected but bar isn't" setup, or a mildly
complex user-group-resource system, you might be able to manage it with
.htaccess and .htpasswd files.
If you need proper user/group permissions on various resources, I prefer to
roll my own - of course, you can always use HTTP auth to get the username
and password into $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"], you
don't have to build a form to collect the details.
I don't bother explicitly setting a cookie, I do it through session
variables and let PHP decide whether to set one or not :-)
ObManPage:
http://www.php.net/manual/en/features.http-auth.php
Cheers
Jon