skulich/laravel-clavis

Laravel Clavis is a lightweight token-based authentication middleware package for Laravel APIs

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/skulich/laravel-clavis

1.0.0 2026-01-02 15:07 UTC

This package is auto-updated.

Last update: 2026-01-09 15:22:25 UTC


README

Latest Version on Packagist PHP Version Require Laravel Version Run Tests Code Coverage License Total Downloads

Laravel Clavis is a lightweight token-based authentication middleware package for Laravel APIs.

Perfect for API-first applications and microservices where you need simple and secure token-based authentication without the overhead of Sanctum.

Key benefits:

  • ๐Ÿš€ Quick Setup: Create a token via CLI
  • ๐Ÿ”’ Secure: Built on Laravel's native Hash generator
  • ๐ŸŽฏ Focused: Designed for server-to-server scenarios
  • ๐Ÿงน Clean: No migrations, No users, No dependencies

Table of contents

Installation

Install the package via Composer.

composer require skulich/laravel-clavis

Usage

CLI Command

Create a new API token via CLI.

php artisan clavis:token

API Middleware

Add the clavis middleware to your API routes.

// Per Route
Route::get('/test', function (Request $request) {
    // return ...
})->middleware('clavis');

// Per Group
Route::middleware('clavis')->group(function () {
    // Route:: ...
});

// Globally in app/bootstrap/app.php
->withMiddleware(function (Middleware $middleware): void {
    $middleware->appendToGroup('api', 'clavis');
})

Tests

Run the entire test suite:

composer test

Changelog

Please see CHANGELOG for more information.

Contributing

Please see CONTRIBUTING for more information.

License

The MIT License (MIT). Please see LICENSE for more information.