PHPackages                             mathewberry/tokenizer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mathewberry/tokenizer

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

mathewberry/tokenizer
=====================

A very lightweight token system for micro-services

0.2.4(8y ago)17701GNUPHP

Since Mar 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mathewberry/tokenizer)[ Packagist](https://packagist.org/packages/mathewberry/tokenizer)[ RSS](/packages/mathewberry-tokenizer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Tokenizer
=========

[](#tokenizer)

A very lightweight token system for micro-services

Installation Lumen
------------------

[](#installation-lumen)

### Service Provider

[](#service-provider)

Remove

```
$app->register(App\Providers\AuthServiceProvider::class);
```

Add

```
$app->register(Mathewberry\Tokenizer\TokenizerServiceProvider::class);
```

### Route Middleware

[](#route-middleware)

Remove

```
'auth' => App\Http\Middleware\Authenticate::class,
```

Add

```
'auth' => Mathewberry\Tokenizer\Middleware\Authenticate::class,
```

### Generate a new token

[](#generate-a-new-token)

`php artisan token:generate`

### Implement a token

[](#implement-a-token)

Copy your generated token into a new key in your `.env` called `API_TOKEN`

How to use
----------

[](#how-to-use)

When ever your make a call just pass the header `api_token` and the value is the value of the token in your `.env`.

Make sure your route or controller is using the `auth` middleware.

### Example

[](#example)

```
class DomainController extends Controller
{
    public function __construct()
    {
        $this->middleware(['auth']);
    }

    public function index()
    {
        $domains = Domain::get();

        return response($domains, 200);
    }
}
```

It's that simple, your micro-service is now that little bit more secure.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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 ~26 days

Recently: every ~33 days

Total

6

Last Release

3240d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cb6dcfb4aae7dac964d1ffc4838ee22e27470e2c616d3ac309f1338e3689785?d=identicon)[berry9mathew](/maintainers/berry9mathew)

---

Top Contributors

[![mathewberry51](https://avatars.githubusercontent.com/u/19976645?v=4)](https://github.com/mathewberry51 "mathewberry51 (7 commits)")[![mathewberry](https://avatars.githubusercontent.com/u/10889016?v=4)](https://github.com/mathewberry "mathewberry (5 commits)")

---

Tags

lumen-packagemicroservicetokenizer

### Embed Badge

![Health badge](/badges/mathewberry-tokenizer/health.svg)

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

###  Alternatives

[bpocallaghan/generators

Custom Laravel File Generators with config and publishable stubs.

12167.1k3](/packages/bpocallaghan-generators)

PHPackages © 2026

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