Simple Access Control
Friday, January 28, 2011

In my previous post, I looked at using a controller plugin as part of a more complex access control system based on an access control list. However, sometimes a simpler solution makes sense. For instance, in a recent project, I just needed to restrict access to the admin section of the site. The admin section was contained within the admin module. I therefore need to check only two things:

  1. Was the user trying to access something in the admin section?
  2. Was the user logged in as admin?

I still needed to add the mechanism for logging in, but there was no need for an access control list, and the implementation of the Access Control Plugin was much simpler. (more…)

Posted by James at 7:26 pm   0 comments

The Access Control Plugin
Wednesday, December 8, 2010

This post deals with the last piece of the access control/authentication jigsaw: the Access Control plugin. It shows how an application can makes use of the Zend Framework’s controller plugin mechanism to apply the access control list to a user request. (more…)

Posted by James at 8:28 pm   5 comments

The Identity Class
Thursday, November 25, 2010

In my previous post about creating an authentication class, I made use of another class, called Application_Model_Identity, to store the details of the user, who has logged in. In this post, I intended to look at some of the things that can be done with such a class, drawing on some of the applications that I have developed myself. (more…)

Posted by James at 7:30 pm   0 comments

The Authentication Class
Sunday, November 21, 2010

I prefer to encapsulate the code for logging in and out in a class. In the example I am using for this series of posts, the class is called Application_Model_Login. We have already seen in this post how it is used in the Login Controller. (more…)

Posted by James at 7:07 pm   4 comments

Implementing Authentication and Access Control using the Zend Framework
Saturday, October 23, 2010

One of the most common, but often complex to implement, features of websites is the facility for users to log in and out of the site, thus allowing them to view content and perform actions that would otherwise be denied to them. The Zend Framework does not provide a single all-in-one component, since the possible approaches are so diverse, but rather provides separate components for authentication (Zend_Auth) and access control (Zend_Acl), and a mechanism for incorporating them into the dispatch process (controller plugins). (more…)

Posted by James at 7:31 pm   2 comments