PHPackages                             germania-kg/authorization - 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. germania-kg/authorization

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

germania-kg/authorization
=========================

1.4.0(3y ago)185MITPHPPHP ^7.4|^8.0CI failing

Since Nov 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/Authorization)[ Packagist](https://packagist.org/packages/germania-kg/authorization)[ RSS](/packages/germania-kg-authorization/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (10)Versions (19)Used By (0)

Germania KG · Authorization
===========================

[](#germania-kg--authorization)

**Simple authorization solution with [PSR-11 Container](https://github.com/php-fig/container) compatibility and PSR-7 style Middleware. No hierarchical stuff so far.**

[![Packagist](https://camo.githubusercontent.com/6e766aa345578ced3ce229498da039cf55a0f5c191c80aa7f8ba8176efd1c8a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765726d616e69612d6b672f617574686f72697a6174696f6e2e7376673f7374796c653d666c6174)](https://packagist.org/packages/germania-kg/authorization)[![PHP version](https://camo.githubusercontent.com/7ad5d46963a6591336920d682d8717737355b298997459fbc6faa4ee4a7956da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6765726d616e69612d6b672f617574686f72697a6174696f6e2e737667)](https://packagist.org/packages/germania-kg/authorization)[![Tests](https://github.com/GermaniaKG/Authorization/actions/workflows/tests.yml/badge.svg)](https://github.com/GermaniaKG/Authorization/actions/workflows/tests.yml)

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

[](#installation)

```
$ composer require germania-kg/authorization
```

Setup
-----

[](#setup)

The *Authorization* constructor requires an Access Control List, i.e. an array with *tasks* as keys and *allowed roles arrays* as elements. The second parameter defines whether to permit in case a task is not defined.

```
