equidna/keygen

Token generator client for API consumption

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/equidna/keygen

dev-main 2025-12-16 15:24 UTC

This package is auto-updated.

Last update: 2025-12-16 15:24:10 UTC


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
    });
});