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(9y ago)27701GNUPHP

Since Mar 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mathewberry/tokenizer)[ Packagist](https://packagist.org/packages/mathewberry/tokenizer)[ RSS](/packages/mathewberry-tokenizer/feed)WikiDiscussions master Synced 3w 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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

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

3285d 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

[statikbe/laravel-cookie-consent

Cookie consent modal for EU

219434.5k](/packages/statikbe-laravel-cookie-consent)[michael-rubel/laravel-enhanced-pipeline

Laravel Pipeline with DB transaction support, events and additional methods.

5522.7k](/packages/michael-rubel-laravel-enhanced-pipeline)[bnomei/kirby3-robots-txt

Manage a virtual robots.txt from the Kirby config file

2250.1k](/packages/bnomei-kirby3-robots-txt)[pavelleonidov/module-tinymce4

Upgrading the Magento 2 core WYSIWYG editor (TinyMCE 3) to TinyMCE 4 for Magento versions up to 2.2, several fixes and additions to Magento 2.3's TinyMCE 4 editor

2040.3k](/packages/pavelleonidov-module-tinymce4)[mwltr/ext-magento2-mwltr-filesystem-filedriver

Dummy Module

137.0k](/packages/mwltr-ext-magento2-mwltr-filesystem-filedriver)

PHPackages © 2026

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