another Auth-class
| From: | Wolfram Kriesing | Date: | Tue, 30 Oct 2001 00:40:12 +0000 |
| Subject: | another Auth-class | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-2432@lists.php.net to get a copy of this message | ||
I have written another Auth-classes based on the PEAR::DB concept
(which i really like - thanks Stig)
http://wolfram.kriesing.de/programming/index.php
here some features/thought about it (from the README)
After thinking about how to do it and finding the combination of
Tomcat4 and PEAR:DB concept the best solution i started implementing
it. And i am very happy with this concept (thanks Stig Bakken for
PEAR::DB) it just gives me all the freedom and flexibility i need. I
hope it helps you too.
This class was inspired by the PEAR::DB and tomcat4 (catalina). I
really like the way tomcat was enabling an always needed
authentication, no matter if via DB or LDAP. And i am using the
PEAR::DB already for quite a long time and i find it very useful and
handy. And after evaluating the PEAR::Auth i just didnt find it
really meeting all my needs. And an authentication system is also some
kind of abstraction, because there might be a DB, LDAP or whatever
below which stores the authentication data.
WAYS TO USE THE CLASS
1. You can use this class as a normal auth-class using the methods
'login', 'logout', 'isLoggedIn', 'isExpired', ... etc. But
then you
always have to check the current state (logged in, logged out, error
cases, etc.).
2. You can use this class in 'auto-Auth' mode, which protects all
specified pages automatically. When a user wants to access a
protected page and he is not logged in he will be redirected to the
login-page, after successful login he will automatically be
redirected to the requested page. If the login fails he will be
redirected to the error-page. If the page expires he will be
redirected to the expire-page.
and a lot more ....
interested? thoughts about it?
Wolfram