PHPackages                             digitaledgeit/zf2-authorisation-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. digitaledgeit/zf2-authorisation-module

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

digitaledgeit/zf2-authorisation-module
======================================

Digital Edge IT authorisation module for Zend Framework v2

0.1.0(12y ago)0382PHPPHP &gt;=5.3.3

Since May 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/digitaledgeit/zf2-authorisation-module)[ Packagist](https://packagist.org/packages/digitaledgeit/zf2-authorisation-module)[ Docs](http://www.digitaledgeit.com.au/)[ RSS](/packages/digitaledgeit-zf2-authorisation-module/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Zend Framework 2 module: DeitAuthorisationModule
================================================

[](#zend-framework-2-module-deitauthorisationmodule)

This module is a simple reusable access control module which restricts access to your controllers based on the user's role.

To restrict access to your controllers, add a new config entry in your module:

```
'deit_authorisation' => array(

	/**
	 * The service name of the unauthorised strategy
	 * @type    string
	 */
	'strategy'  => 'DeitAuthorisationModule\View\ViewStrategy',

	/**
	 * The view template to display when the user is unauthorised
	 * @type    string
	 */
	'template'  => 'error/401',

	/**
	 * The route to redirect to when the user is unauthorised
	 * @type    string
	 */
	'route'     => 'log-in',

	/**
	 * The access control list
	 * @var array
	 */
	'acl'       => array(
		'roles'     => array(
			'guest',
			'admin' => 'guest'                                              //the admin role inherits guest permissions
		),
		'resources' => array(
			'DeitAuthenticationModule\\Controller\\Authentication\\log-in',
			'DeitAuthenticationModule\\Controller\\Authentication\\log-out',
			'DeitAuthenticationModule\\Controller\\Authentication',
			'DeitAuthenticationModule',
			'Application',
		),
		'rules'     => array(
			'allow'     => array(
				'DeitAuthenticationModule\\Controller\\Authentication\\log-in'  => 'guest',  //restrict access to a specific action
				'DeitAuthenticationModule\\Controller\\Authentication\\log-out' => 'admin' ,
				//'DeitAuthenticationModule\\Controller\\Authentication'        => 'admin',  //restrict access to a specific controller
				'Application'                                                   => 'admin',  //restrict access to a specific module
			),
		),
	),

	/**
	 * The default role used when no authenticated identity is present or the identity's role can't be discovered
	 * @var string
	 */
	'default_role'  => 'guest',

	/**
	 * The role resolver used to discover the role of an identity when preset
	 * @var callable
	 */
	'role_resolver' => function($identity) {
		if ($identity) {                                                     //this will be different if you have multiple roles which your authenticated users can be
			return 'admin';
		} else {
			return 'guest';
		}
	},

),

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4425d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9050e05cfda0799a4c46ef532967b7b970546a223bc2144e75531ff199967ba?d=identicon)[jameslnewell](/maintainers/jameslnewell)

### Embed Badge

![Health badge](/badges/digitaledgeit-zf2-authorisation-module/health.svg)

```
[![Health](https://phpackages.com/badges/digitaledgeit-zf2-authorisation-module/health.svg)](https://phpackages.com/packages/digitaledgeit-zf2-authorisation-module)
```

###  Alternatives

[zf-commons/zfc-user

A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.

4851.1M71](/packages/zf-commons-zfc-user)[socalnick/scn-social-auth

Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.

21674.9k3](/packages/socalnick-scn-social-auth)[zfr/zfr-oauth2-server-module

Zend Framework 2 module for ZfrOAuth2Server

1236.6k1](/packages/zfr-zfr-oauth2-server-module)[franz-deleon/fdl-oauth2-provider

ZF2 OAuth2 Provider module

166.8k](/packages/franz-deleon-fdl-oauth2-provider)[org_heigl/hybridauth

Lightweight Authentication Module for Zend-Framework 2 using the hybridauth-library

212.6k](/packages/org-heigl-hybridauth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
