Shibboleth authentication adapter for the Zend Framework
I have been running some sites under a Shibboleth Service Provider for quite a long time. In some cases I had to modify applications written in PHP to be able to use Shibboleth authentication. But now I reached the point, when I had to implement Shibboleth authentication in my own application. Since I’m using Zend Framework for years, the natural way to achieve that was implementing a Shibboleth authentication adapter for the Zend_Auth component.
Actually, the task is quite simple, because all the required information is contained in the environment variables. The only “challenge” is to make sure the adapter is as generic and flexible as possible, so it can be deployed in various environments and applications. The configuration options for the adapter mostly specify the names of the attributes containing relevant information and possibly a mapping between the attribute names and the local names. Typical usage:
1 2 3 4 5 6 7 8 9 10 11 12 | $auth = Zend_Auth::getInstance(); $authAdapter = new ShibbolethAdapter(array( 'identityVar' => 'id', 'attrMap' => array( 'uid' => 'id', 'cn' => 'name', 'mail' => 'email' ) )); $result = $auth->authenticate($authAdapter); |
Continue reading ‘Shibboleth authentication adapter for the Zend Framework’ »
