PHPackages                             gburtini/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. gburtini/acl

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

gburtini/acl
============

Dependency free, simple access control lists for PHP.

0.1.0(11y ago)3710.4k7[1 issues](https://github.com/gburtini/PHP-ACL/issues)GPLPHPPHP &gt;=5.5.0

Since Apr 9Pushed 10y ago6 watchersCompare

[ Source](https://github.com/gburtini/PHP-ACL)[ Packagist](https://packagist.org/packages/gburtini/acl)[ Docs](http://github.com/gburtini/PHP-ACL)[ RSS](/packages/gburtini-acl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

PHP-ACL: Simple Access Control Lists
====================================

[](#php-acl-simple-access-control-lists)

*A simple, dependency-free (in use) user/login/cookie management, role and user-level access control system.*

This is a very straightforward, simple and easy to use user system, ready to be extended for any purpose.

The ACL component is based on Nette\\Security which was itself based on Zend\_Acl.

Installation
------------

[](#installation)

You can clone the repository and work with the files directly, but everything is set up for composer, which makes it simple:

```
composer require gburtini/acl

```

Usage
-----

[](#usage)

There are three parts to using this package.

- Implementing an Authenticator for your use-case
- Developing the access control lists.
- Integrating the User class.

Each can be complex or simple depending on your use case.

An Authenticator is a class that implements the method `->authenticate($username, $password[, $roles])`, verifies the users name and password (and if specified, requested roles), and returns a unique identifier for the user and a set of roles that belong to him in the format \['id' =&gt; 123, 'roles' =&gt; \['administrator'\]\]. Some notes are provided in Authenticator.php on *some* but not all the considerations necessary to write a good authentication system. A SimpleAuthenticator is provided in SimpleAuthenticator.php for demonstration purposes

```
