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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
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.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitaledgeit/zf2-authorisation-module contains the following files

Loading the files please wait ....