PHPackages                             opportus/authorizer - 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. opportus/authorizer

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

opportus/authorizer
===================

Provides a simple yet powerful authorization system

v1.0.0(3y ago)169[1 PRs](https://github.com/opportus/authorizer/pulls)MITPHPPHP ^8.0CI failing

Since Jun 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/opportus/authorizer)[ Packagist](https://packagist.org/packages/opportus/authorizer)[ Docs](https://github.com/opportus/authorizer)[ RSS](/packages/opportus-authorizer/feed)WikiDiscussions master Synced 1mo ago

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

Authorizer
==========

[](#authorizer)

[![License](https://camo.githubusercontent.com/b5b5b5da176161682055e22b019797c66db341e56f0c8fe51678b04f87562bb5/68747470733a2f2f706f7365722e707567782e6f72672f6f70706f727475732f617574686f72697a65722f6c6963656e7365)](https://packagist.org/packages/opportus/authorizer)[![Latest Stable Version](https://camo.githubusercontent.com/73a9e5bbf231909b696b1889dc1f48aeef4b7968df039324c1363bb165571813/68747470733a2f2f706f7365722e707567782e6f72672f6f70706f727475732f617574686f72697a65722f762f737461626c65)](https://packagist.org/packages/opportus/authorizer)[![Latest Unstable Version](https://camo.githubusercontent.com/359eba6aa00223ab9548e1afad8cf27fcfe2a8e54192ce6d24fa2f1dc5e09e90/68747470733a2f2f706f7365722e707567782e6f72672f6f70706f727475732f617574686f72697a65722f762f756e737461626c65)](https://packagist.org/packages/opportus/authorizer)[![Build](https://github.com/opportus/authorizer/workflows/Build/badge.svg)](https://github.com/opportus/authorizer/actions?query=workflow%3ABuild)

**Index**

- [Introduction](#introduction)
- [Roadmap](#roadmap)
    - [v1.1](#v11)
- [Integrations](#integrations)
- [Setup](#setup)
    - [Step 1 - Installation](#step-1---installation)
    - [Step 2 - Initialization](#step-2---initialization)
- [Authorization](#authorization)
    - [Concept](#concept)
    - [Example Use Cases](#example-use-cases)

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

[](#introduction)

This library provides a generic and standardizable authorization system.

Roadmap
-------

[](#roadmap)

To develop this solution faster, [contributions](https://github.com/opportus/authorizer/blob/master/.github/CONTRIBUTING.md) are welcome...

v1.1:

- Implement property chain access support
- Implement multiple condition authorization support
- Implement multiple comparison operators support
- Implement higher test coverage

Integrations
------------

[](#integrations)

- {{ reference\_here\_your\_own\_integration }}

Setup
-----

[](#setup)

### Step 1 - Installation

[](#step-1---installation)

Open a command console, enter your project directory and execute:

```
$ composer require opportus/authorizer
```

### Step 2 - Initialization

[](#step-2---initialization)

This library contains 4 services. 3 of them require a single dependency which is another lower level service among those 4:

```
use Opportus\Authorizer\Authorizer;
use Opportus\Authorizer\ObjectPropertyAccessor\ObjectPropertyAccessor;

$objectPropertyAccessor = new ObjectPropertyAccessor();
$authorizer             = new Authorizer($objectPropertyAccessor);
```

In order for the authorizer to get properly initialized, each of its services it depends on must be instantiated such as above.

By design, this solution does not provide "helpers" for the instantiation of its own services which is much better handled the way you're already instantiating your own services, with a DIC system or whatever.

Authorization
-------------

[](#authorization)

### Concept

[](#concept)

An **authorization** is a *use case* assigned to an *actor* of your system.

An **authorization** is composed of:

- an **operation**
- (on) a **resource**
- (under) an optional **condition**

### Example Use Cases

[](#example-use-cases)

...

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1442d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c6ed3ce0fc49269e52a4b9afa7f4e52b83dab499856a88f1e530df6a92ed6dc?d=identicon)[opportus](/maintainers/opportus)

---

Top Contributors

[![opportus](https://avatars.githubusercontent.com/u/11618989?v=4)](https://github.com/opportus "opportus (2 commits)")

---

Tags

authauthorizationauthorizer

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/opportus-authorizer/health.svg)

```
[![Health](https://phpackages.com/badges/opportus-authorizer/health.svg)](https://phpackages.com/packages/opportus-authorizer)
```

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[league/oauth2-server-bundle

Symfony bundle .

2344.7M6](/packages/league-oauth2-server-bundle)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[dyorg/slim-token-authentication

Slim 3.0+ Token Authentication Middleware

78106.5k](/packages/dyorg-slim-token-authentication)

PHPackages © 2026

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