PHPackages                             jnjxp/cheka - 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. jnjxp/cheka

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

jnjxp/cheka
===========

Radar route ACL Authorization

04PHP

Since May 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jnjxp/jnjxp.cheka)[ Packagist](https://packagist.org/packages/jnjxp/cheka)[ RSS](/packages/jnjxp-cheka/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

jnjxp.cheka
===========

[](#jnjxpcheka)

Cheka: Route based ACL for Aura\\Route and Radar\\Adr

[![Latest version](https://camo.githubusercontent.com/815154d7a9a70d0d5e871b19754f77cac8c0fcffa8233ba664fcfcdf694af6e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6e6a78702f6368656b612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jnjxp/cheka)[![Build Status](https://camo.githubusercontent.com/383271339c731485786740e3371ff50edb22c1c1859c0d116166dd7419cfa950/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a6e6a78702f6a6e6a78702e6368656b612f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jnjxp/jnjxp.cheka)[![Coverage Status](https://camo.githubusercontent.com/8f5ca6502e87f06db424c1a7beeae2cfa654304dcab461cdab1cf2014aeadb7c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a6e6a78702f6a6e6a78702e6368656b612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jnjxp/jnjxp.cheka)[![Quality Score](https://camo.githubusercontent.com/f7989dfa2d5cc349c5ea9fe5acd5798f79f524a4dd0d3e3574e3f668fe8af7d3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a6e6a78702f6a6e6a78702e6368656b612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/jnjxp/jnjxp.cheka)

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

[](#installation)

```
composer install jnjxp/cheka

```

Usage
-----

[](#usage)

`Jnjxp\Cheka\Config` will `setRouteFactory()` on `Aura\Router\RouterContainer`so as to use `Jnjxp\Cheka\Route\RadarRoute`.

It will also set the service `jnjxp/cheka:acl` as an instance of `Zend\Permissions\Acl\Acl` which will be passed to `Jnjxp\Cheka\AuthorizedRule`.

`Jnjxp\Cheka\AuthorizedRule` will be appended to `Aura\Router\Rule\RuleIterator`.

```
$adr = $boot->adr(
    //...,
    Jnjxp\Cheka\Config::class,
    MyConfig::class
);
```

You'll want to configure your Acl. `Jnjxp\Cheka\Acl\Config` might help.

```
use Jnjxp\Cheka\Acl\Config as AclConfig;
use Zend\Permissions\Acl\Acl;

class MyConfig extends AclConfig
{
    protected $resources = ['resource'];
    protected $roles = ['guest', 'user'];

    protected function init(Acl $acl)
    {
        foreach ($this->resources as $resource) {
            $acl->addResource($resource);
        }

        foreach ($this->roles as $role) {
            $acl->addRole($role);
        }

        $acl->allow('guest', 'resource', 'read');
        $acl->allow('user', 'resource');
    }
}
```

When defining routes, you can designate a 'Resource' and a 'Privilege'.

```
$adr->get('Action\Resource\Read', '/resource/{id}', Resource\Service\Read::class)
    ->resource('resource')
    ->privilege('read');

$adr->patch('Action\Resource\Edit', '/resource/{id}', Resource\Service\Edit::class)
    ->resource('resource')
    ->privilege('edit');

// note, under the hood these values are only stored in the `extras` property
// The following has the same effect, assuming you have not changed the keys
// under which these values are stored.

$adr->patch('Action\Resource\Edit', '/resource/{id}', Resource\Service\Edit::class)
    ->extras(['resource' => 'resource', 'privilege' => 'edit']);
```

You'll need to add the `RoleHandler` to the middleware stack as well. Additionally, this is intended to work with Aura\\Auth, so you'll probably need something like this:

```
$adr->middle(Vperyod\AuthHandler\AuthHandler::class);
// By default, the RoleHandler assumes there's an Aura\Auth object available in
// the request, so add the AuthHandler first, or modify it.
$adr->middle(Jnjxp\Cheka\RoleHandler::class);
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

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://www.gravatar.com/avatar/64baf5fff415327ccc832998afe54b34ac3c621e401f128a9343d4e0b0a3f9e4?d=identicon)[jnj](/maintainers/jnj)

---

Top Contributors

[![jakejohns](https://avatars.githubusercontent.com/u/174708?v=4)](https://github.com/jakejohns "jakejohns (3 commits)")

### Embed Badge

![Health badge](/badges/jnjxp-cheka/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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