thisisdevelopment/laravel-api-token-middleware

Simple API token middleware for internal APIs
1,846
Install
composer require thisisdevelopment/laravel-api-token-middleware
Latest Version:v1.4.0
PHP:>=7
Last Updated:Apr 23, 2026
Links: GitHub  ·  Packagist
Maintainer: ederuiter

laravel-api-token-middleware

Simple API token middleware for Laravel applications

Setup

Publish the config by using the following command

php artisan vendor:publish --provider="ThisIsDevelopment\LaravelApiTokenMiddleware\ApiTokenServiceProvider"

The API token, token header field and unauthorized message are now configurable in config/laravel-api-token-middleware.php, the token is loaded from the INTERNAL_API_TOKEN env field by default.

Usage

To use the middleware, include:

ThisIsDevelopment\LaravelApiTokenMiddleware\Http\Middleware\VerifyInternalApiToken

In your middleware list.

Related Packages

rickycezar/laravel-jwt-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users...

132,666 24
lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users...

20,848,025 2,344
lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticat...

168,712 222
fwartner/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users...

6 0