29
Look good Mercibe.
A couple of comments, though.
Some of the methods are strikingly similar (loginUser() and logoutUser() for instance) - why don't you have a parent class to hold the basic method implementations and let your specialized authentication classes extend that one?
You are missing a global declaration of $xoopsUser in logoutUser()
Typo in loginUserMD5() - the parameter is $pwd, but the one used in the method is $md5pwd
I don't understand the implementation in ldap.php
$myts =& MyTextsanitizer::getInstance();
$this->addLDAPUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)));
$user =& $this->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)));
addLDAPUser() returns true or false, but it isn't used? Also, am I right in thinking that what it basically does is this:
1) Check if the user exists on the LDAP server
2) If yes, check if the user exists in XOOPS
2a) If no, create the user
2b) If yes, update with email etc. information
If so, why the call to loginUser() ? Why not just return the $xuser object that was created/updated in the LDAP check?
Keep up the good work (and do note that I am very unproficient in authentication matters)