From: Marc <telenieko@gm...> - 2005-08-18 16:51:20
From dev.tw.o: tracker5, item 327:=20
userslib.php is actually a mess where AuthPAM, PEAR and CAS have been
pasted inside, my idea is to rewrite userslib.php with the idea of
"modular authenticators" that is, having a directory like
lib/userslib/ put there authlib_cas.php, authlib_pear.php,
authlib_pam.php and tikiauth.php (for the builtin tiki's
The goal is that a user can create a new authlib_*.php file for his
own purposes (actually I need one for Active Directory via php-ldap
and another for our customers database) without the need of touching
userslib.php at all, so upgrading would be much easier, and writting
your own authenticator would be really much easier than now.
I'm currently working on that on BRANCH-1-9 as that's the one I use at
the office but userslib.php from 1.9 to HEAD is untouched so no issues
come with that.
My plan is to initially split userslib.php into cas, pear, pam and the
builtin modules (a lot of work there!) then rewrite the Login section
of the admin panel so it adapts to it's new nature.
The ways to preserve environment I've tought are: being able to
enable/disable any module at any time, having only the current 3
enabled by default, and set what would be the new
"authenticators_order" preference to meet the current possible
situations also retaining preferences.
What I still don't know how to handle is:
How an authenticator can create/delete it's preferences from
tiki_preferences when enabled/disabled (is there any tikilib function
to create/delete preferences?)
Comments are welcome!