equidna / keygen
Token generator client for API consumption
0.1
2026-01-19 22:40 UTC
Requires
- equidna/laravel-toolkit: ^1.0
- laravel/framework: ^12.0 | ^11.0
- laravel/prompts: ^0.3.8
README
This package provides token generation and a middleware to validate incoming requests.
Token generation
Generate a token by running the Artisan command:
php artisan generate-token
The command will output (or store, depending on the package configuration) the token required to authorize requests.
Middleware usage
The package includes a middleware that validates the presence and validity of the token. Registered under Keygen.ValidateToken, it can be used as follows:
Route::middleware(['Keygen.ValidateToken'])->group(function () { Route::get('/endpoint', function () { // Only accessible to requests with a valid token }); });