PHPackages                             grixu/passport-module-auth - 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. grixu/passport-module-auth

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

grixu/passport-module-auth
==========================

This package provides model, command &amp; middleware to easily forbid access to certain modules(domains in DDD) when using Client Credentials Grant Tokens

1.2.2(4y ago)0523[5 PRs](https://github.com/grixu/passport-module-auth/pulls)MITPHPPHP ^7.1|^8.0

Since Nov 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/grixu/passport-module-auth)[ Packagist](https://packagist.org/packages/grixu/passport-module-auth)[ Docs](https://github.com/grixu/passport-module-auth)[ RSS](/packages/grixu-passport-module-auth/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (12)Versions (13)Used By (0)

Passport Module Auth
====================

[](#passport-module-auth)

This package provides model, commands &amp; middleware to easily forbid access to certain modules(domains in DDD) when using Client Credentials Grant Tokens.

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

[](#installation)

You can install the package via composer:

```
composer require grixu/passport-module-auth
```

Usage
-----

[](#usage)

Publish config file to adjust module names in your project:

```
php artisan vendor:publish --tag=config --provider=Grixu\\PassportModuleAuth\\PassportModuleAuthServiceProvider
```

Add the middleware to your Kernel class which handling HTTP requests in your Laravel project. In default project scaffold you should edit: `app/Http/Kernel.php`

```
use Grixu\PassportModuleAuth\Middleware\ModuleAuthMiddleware;

/**
 * The application's route middleware.
 *
 * These middleware may be assigned to groups or used individually.
 *
 * @var array
 */
protected $routeMiddleware = [
    'auth' => Authenticate::class,
    'auth.basic' => AuthenticateWithBasicAuth::class,
    'client' => CheckClientCredentials::class,
    'cache.headers' => SetCacheHeaders::class,
    'can' => Authorize::class,
    'guest' => RedirectIfAuthenticated::class,
    'password.confirm' => RequirePassword::class,
    'signed' => ValidateSignature::class,
    'throttle' => ThrottleRequests::class,
    'verified' => EnsureEmailIsVerified::class,
    'passport_module' => ModuleAuthMiddleware::class
];
```

Then just use it in your controllers or routes. Remember about passing module name!

```
Route::middleware(['passport_module:products']);
```

### Artisan command

[](#artisan-command)

You can use artisan command `passport:module-auth` to manage entries in Module Auth system.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [grixu](https://github.com/grixu)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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

Every ~59 days

Recently: every ~4 days

Total

7

Last Release

1687d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.0.1PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67002661?v=4)[Mateusz Gostański](/maintainers/grixu)[@grixu](https://github.com/grixu)

---

Top Contributors

[![grixu](https://avatars.githubusercontent.com/u/67002661?v=4)](https://github.com/grixu "grixu (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

hacktoberfestgrixupassport-module-auth

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/grixu-passport-module-auth/health.svg)

```
[![Health](https://phpackages.com/badges/grixu-passport-module-auth/health.svg)](https://phpackages.com/packages/grixu-passport-module-auth)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.2k](/packages/larastan-larastan)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M186](/packages/laravel-ai)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k89.7k1](/packages/mike-bronner-laravel-model-caching)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.0k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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