Professional Documents
Culture Documents
Asmiil
Asmiil
I've fielded a number of questions from people wanting to know how to handle aut hentication and identity persistence in Zend Framework. The typical issue is tha t they're unsure how to combine: An authentication adapter A login form A controller for login/logout actions Checking for an authenticated user in subsequent requests It's not terribly difficult, but it does require knowing how the various pieces of the MVC fit together, and how to use Zend_Auth. Let's take a look. Authentication Adapter For all this to work, you'll need an authentication adapter. I'm not going to go into specifics on this, as the documentation covers them, and your needs will v ary based on your site. I will make the assumption, however, that your authentic ation adapter requires a username and password for authentication credentials. Our login controller will make use of the adapter, but simply have a placeholder for retrieving it. Login Form