PHPackages                             marcoazn89/route-protection - 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. marcoazn89/route-protection

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

marcoazn89/route-protection
===========================

07.5kPHP

Since Oct 11Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

route-protection
================

[](#route-protection)

Module to protect your routes based on roles + access type

OAuth2 configuration
--------------------

[](#oauth2-configuration)

```
// Example. I bet you might want to request to make them work also based on GET, POST, etc, but for now get creative with the roles.

$config =  [
    '/api/account[/]' => [
      'admin' => ['web','curl']
    ],
    '/api/account/{id}[/]' => [
      'admin' => ['web','curl'],
      'partner' => ['web'],
      'user' => ['web']
    ]
]
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

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/0b79592619d05638f7b2d2518c3cb87b377aa6afe0a6abc1267533522ac1ddf1?d=identicon)[marcoazn89](/maintainers/marcoazn89)

---

Top Contributors

[![marcoazn89](https://avatars.githubusercontent.com/u/5152559?v=4)](https://github.com/marcoazn89 "marcoazn89 (13 commits)")

### Embed Badge

![Health badge](/badges/marcoazn89-route-protection/health.svg)

```
[![Health](https://phpackages.com/badges/marcoazn89-route-protection/health.svg)](https://phpackages.com/packages/marcoazn89-route-protection)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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