PHPackages                             arvind2110/zf2-auth-acl - 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. arvind2110/zf2-auth-acl

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

arvind2110/zf2-auth-acl
=======================

ZF2-Auth-ACL is very simple ZF2 module for ZF2 Auth/ACL use.

149618[4 issues](https://github.com/arvind2110/ZF2-Auth-ACL/issues)[1 PRs](https://github.com/arvind2110/ZF2-Auth-ACL/pulls)PHP

Since Sep 4Pushed 11y ago5 watchersCompare

[ Source](https://github.com/arvind2110/ZF2-Auth-ACL)[ Packagist](https://packagist.org/packages/arvind2110/zf2-auth-acl)[ RSS](/packages/arvind2110-zf2-auth-acl/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

ZF2-Auth-ACL
============

[](#zf2-auth-acl)

ZF2-Auth-ACL
------------

[](#zf2-auth-acl-1)

Simple module to implement Zenb Auth and Zend ACL in Zend Framework 2

Database tables required
------------------------

[](#database-tables-required)

Following database tables are required to use this module. You can modify the tables and table information as per your need. Also make changes in code regarding the same.

```
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  `status` enum('Y','N') NOT NULL DEFAULT 'Y',
  `created_on` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8

CREATE TABLE `role` (
  `rid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `role_name` varchar(45) NOT NULL,
  `status` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
  PRIMARY KEY (`rid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8

CREATE TABLE `user_role` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8

CREATE TABLE `resource` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `resource_name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE `permission` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `permission_name` varchar(45) NOT NULL,
  `resource_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1

CREATE TABLE `role_permission` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(10) unsigned NOT NULL,
  `permission_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

/* Add Roles */

INSERT INTO `demo`.`role` (`role_name`, `status`) VALUES ('Role1', 'Active');
INSERT INTO `demo`.`role` (`role_name`, `status`) VALUES ('Role2', 'Active');
INSERT INTO `demo`.`role` (`role_name`, `status`) VALUES ('Role3', 'Active');

/* Add Rresorces */

INSERT INTO `demo`.`resource` (`resource_name`) VALUES ('Application\\Controller\\Index');
INSERT INTO `demo`.`resource` (`resource_name`) VALUES ('ZF2AuthAcl\\Controller\\Index');

/* Add Users */
INSERT INTO `demo`.`users` (`email`, `password`, `status`) VALUES ('example.1@example.com', 'd7d833534a39afbac08ec536bed7ae9eeac45638', 'Y');
INSERT INTO `demo`.`users` (`email`, `password`, `status`) VALUES ('example.2@example.com', 'd7d833534a39afbac08ec536bed7ae9eeac45638', 'Y');
INSERT INTO `demo`.`users` (`email`, `password`, `status`) VALUES ('example.3@example.com', 'd7d833534a39afbac08ec536bed7ae9eeac45638', 'Y');

/* Add User Roles */
INSERT INTO `demo`.`user_role` (`user_id`, `role_id`) VALUES (1, 1);
INSERT INTO `demo`.`user_role` (`user_id`, `role_id`) VALUES (2, 2);
INSERT INTO `demo`.`user_role` (`user_id`, `role_id`) VALUES (3, 3);

/* Add Permissions */
INSERT INTO `demo`.`permission` (`permission_name`, `resource_id`) VALUES ('index', 1);
INSERT INTO `demo`.`permission` (`permission_name`, `resource_id`) VALUES ('index', 2);
INSERT INTO `demo`.`permission` (`permission_name`, `resource_id`) VALUES ('show', 1);
INSERT INTO `demo`.`permission` (`permission_name`, `resource_id`) VALUES ('test', 1);

/* Add User Role Permissions */
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (1, 1);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (1, 2);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (1, 3);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (1, 4);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (2, 1);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (2, 2);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (3, 1);
INSERT INTO `demo`.`role_permission` (`role_id`, `permission_id`) VALUES (3, 3);
```

White List
----------

[](#white-list)

There are some pages which does not require authentication(Auth) or authrization(Acl). So, we include settings for those pages in terms of cotroller name, action name, module name.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7286603?v=4)[Arvind Singh](/maintainers/arvind2110)[@arvind2110](https://github.com/arvind2110)

---

Top Contributors

[![arvind2110](https://avatars.githubusercontent.com/u/7286603?v=4)](https://github.com/arvind2110 "arvind2110 (14 commits)")

### Embed Badge

![Health badge](/badges/arvind2110-zf2-auth-acl/health.svg)

```
[![Health](https://phpackages.com/badges/arvind2110-zf2-auth-acl/health.svg)](https://phpackages.com/packages/arvind2110-zf2-auth-acl)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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