Zend Framework Authentication and ACL options
I’m slowly working my way into Zend. Right now I’m trying to figure out the best way to use auth and ACL. From my research, it looks like you have three main options when it comes to implementing this:
- Extend Zend_Controller_Action controller
- Create a controller plug-in
- Create an action helper
The first option, extending Zend_Controller_Action to use as a base controller for all of your controllers is highly frowned upon. I can’t recall the exact reasoning right now. The second and third options are more what I’m interested in and would like to know which is better (if one is better) and why. I’ve got code to do the controller plug-in and partial code for the action helper.
Found this again: http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework
Advertisement
Very old subject but my suggestion would be to make the authentication in controller plug-in and authorization in action helper.