PHPackages                             stallionexpress/authutility - 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. stallionexpress/authutility

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

stallionexpress/authutility
===========================

Package to implement auth

0.0.41(1y ago)03.0kMITPHPPHP &gt;=8.0

Since Jul 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/se-bahubali/auth-utility)[ Packagist](https://packagist.org/packages/stallionexpress/authutility)[ Docs](https://github.com/stallionexpress/authutility)[ RSS](/packages/stallionexpress-authutility/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (18)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d17f203f01bd04c3503dcda0a050882fcf31099b2b90afc4f82d507f034d02aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374616c6c696f6e657870726573732f617574687574696c6974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stallionexpress/authutility)[![Total Downloads](https://camo.githubusercontent.com/3859c682c3074ab54363dc3d45e4535c2d30ffb9fff6105807cfa573be5d8d53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374616c6c696f6e657870726573732f617574687574696c6974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stallionexpress/authutility)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
composer require stallionexpress/authutility
```

.env setup
----------

[](#env-setup)

Setup these keys in your .env file

```
AUTH_SERVER_URL="http://auth.stallionexpress.xyz"
CLIENT_ID="your client id"
CLIENT_SECRET="your client secret"
FRONT_END_URL="your front end redirect url"
```

Register provider
-----------------

[](#register-provider)

First add Register *StallionExpress\\AuthUtility\\Providers\\StallionServiceProvider* in your config/app.php

```
'providers' => [
        StallionExpress\AuthUtility\Providers\StallionServiceProvider::class,
]
```

Register guard
--------------

[](#register-guard)

Add the below code in your config/auth.php

```
'guards' => [
        'token' => [
            'driver' => 'access_token',
        ],
    ],
```

Middleware Usage
----------------

[](#middleware-usage)

If you want to use our middleware to decode has value then add middleware to laravel project

step 1: add middleware to kernal

```
use StallionExpress\AuthUtility\Middleware\ReplaceRouteAndRequestHashValueMiddleware;
```

step 2: add middleware to kernal

```
protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            ReplaceRouteAndRequestHashValueMiddleware::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],

        'api' => [
            \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
            'throttle:api',
            ReplaceRouteAndRequestHashValueMiddleware::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
    ];
```

Trait Usage
-----------

[](#trait-usage)

If you want to use PrimaryIdEncodeTrait

- Step 1: Import namespace

```
use StallionExpress\AuthUtility\Trait\PrimaryIdEncodeTrait;
```

- Step 2: Add to use

```
use PrimaryIdEncodeTrait;
```

If you want to use STEncodeDecodeTrait

- Step 1: Import namespace

```
use StallionExpress\AuthUtility\Trait\STEncodeDecodeTrait;
```

- Step 2: Add to use

```
use STEncodeDecodeTrait;
```

### 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)

- [Avinash Kant](https://github.com/se-bahubali)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

- lluminate/support": "^10.12.0"

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Every ~37 days

Recently: every ~15 days

Total

16

Last Release

466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c70f4b51e30980e2d17d300cbe24824993e3b31c978f0187f0fcf3b0aefb139f?d=identicon)[SEBahubali](/maintainers/SEBahubali)

---

Top Contributors

[![se-bahubali](https://avatars.githubusercontent.com/u/131521059?v=4)](https://github.com/se-bahubali "se-bahubali (50 commits)")

---

Tags

stallionexpressauthutility

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stallionexpress-authutility/health.svg)

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

###  Alternatives

[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)[illuminate/auth

The Illuminate Auth package.

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

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)

PHPackages © 2026

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