Hello,
I have implemented Zend_Auth for admin users to login and I'm
checking authentication and ACLs in a preDispatch plugin.
Now I need to authenticate a different type of user which has nothing
to do with the admins and uses a totally different storage engine and
auth adapter.
I'm trying to figure out how to keep these users separate and I can't
seem to figure it out.
At this point I'm thinking I need a new class which extends
Zend_Auth, but Zend_Auth being a singleton I'll always get back an
instance of Zend_Auth.
Even if I extend the class as below, "hasIdentity()" will return
true if the admin has logged in under Zend_Auth:
class My_Auth_Otheruser extends Zend_Auth
{
protected static $_instance = null;
protected $_storage = null;
public static function getInstance()
{
if (null === self::$_instance) {
self::$_instance = new self();
}
return self::$_instance;
}
}
Does anyone have any suggestions on how to implement several
different authentication schemes? Do I need to extend Zend_Auth for
the admin and the other users and not use Zend_Auth directly?
Thanks,
Todd