PHPackages                             techart/abac - 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. [Security](/categories/security)
4. /
5. techart/abac

ActiveLibrary[Security](/categories/security)

techart/abac
============

Fork of craftcamp/php-abac - Library used to implement Attribute-Based Access Control in a PHP application

1.0.2(4y ago)042MITPHPPHP &gt;=7.0

Since Nov 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/techart/abac)[ Packagist](https://packagist.org/packages/techart/abac)[ RSS](/packages/techart-abac/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

\[Techart\] techart-abac
========================

[](#techart-techart-abac)

### Attribute-Based Access Control implementation library

[](#attribute-based-access-control-implementation-library)

This is fork of [CraftCamp/php-abac](https://github.com/CraftCamp/php-abac)

Introduction
------------

[](#introduction)

This library is meant to implement the concept of ABAC in your PHP applications.

The concept is to manage access control using attributes : from users, from resources and environment.

It allows us to define rules based on the properties of the user object and optionally the accessed object.

These rules will be checked in your application to determine if an user is allowed to perform an action.

The following links explain what ABAC is :

- [ABAC Introduction](http://www.axiomatics.com/attribute-based-access-control.html)
- [NIST specification](http://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.sp.800-162.pdf)

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

[](#installation)

**Using composer :**

```
composer require techart/abac
```

Then you will have to configure the attributes and the rules of your application.

For more details about this, please refer to the [dedicated documentation](doc/configuration.md)

Documentation
-------------

[](#documentation)

- [Configuration](doc/configuration.md)
- [Dependency Injection](doc/dependency-injection.md)
- [Access-control](doc/access-control.md)
- [Comparisons](doc/comparisons.md)
- [Caching](doc/caching.md)

Usage Examples
--------------

[](#usage-examples)

**Example with only user attributes defined in the rule**

We have in this example a single object, representing the current user.

This object have properties, with getter methods to access the values.

For example, we can code :

```
