Download the PHP package digitaledgeit/zf2-authorisation-module without Composer
On this page you can find all versions of the php package digitaledgeit/zf2-authorisation-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download digitaledgeit/zf2-authorisation-module
More information about digitaledgeit/zf2-authorisation-module
Files in digitaledgeit/zf2-authorisation-module
Download digitaledgeit/zf2-authorisation-module
More information about digitaledgeit/zf2-authorisation-module
Files in digitaledgeit/zf2-authorisation-module
Vendor digitaledgeit
Package zf2-authorisation-module
Short Description Digital Edge IT authorisation module for Zend Framework v2
License
Homepage http://www.digitaledgeit.com.au/
Package zf2-authorisation-module
Short Description Digital Edge IT authorisation module for Zend Framework v2
License
Homepage http://www.digitaledgeit.com.au/
Please rate this library. Is it a good library?
Informations about the package zf2-authorisation-module
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';
}
},
),
All versions of zf2-authorisation-module with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.3
zendframework/zend-mvc Version 2.*
zendframework/zend-servicemanager Version 2.*
zendframework/zend-mvc Version 2.*
zendframework/zend-servicemanager Version 2.*
The package digitaledgeit/zf2-authorisation-module contains the following files
Loading the files please wait ....