Thread: Acl/Auth
View Single Post
  #2 (permalink)  
Old 03-12-2008, 01:17 PM
xentek's Avatar
xentek xentek is offline
Senior Member
 
Join Date: Feb 2008
Posts: 112
Default

Hi Alix,

Zend_Auth is really a convenience method, especially when authenticating the user from a Database. Its power really shines when you start getting into the Authentication back-ends, such as using the HTTP Auth (Challenge/Response, .htpasswd).

Either way, you don't really want a view to go with the methods of Zend_Auth. Create a model function, possibly as a static method, and use this to authenticate against INSIDE your action method in your user controller. Its in this action method that you would you code your login form into your view script. The action that that form calls should in turn call the model function you created that utilizes Zend_Auth.

Zend_ACL is a different beast altogether. If you have a need for granular control over different resources (pages, etc) for different users than utilize that. If you have a flater access control scheme (you're either logged in, or you're not) then ACL may be overkill. Get the Zend_Auth out of the way, and then revisit ACL.
__________________
- xentek
Reply With Quote