Registry / auth / tuupola-slim-jwt-auth

tuupola-slim-jwt-auth

JSON →
library3.8.0phppackagistunverified

PSR-7 and PSR-15 JWT Authentication Middleware.

composer require tuupola/slim-jwt-auth
INSTALL
IMPORT
SIG · TUUPOLA-SLIM-JWT-A
T
tuupola-slim-jwt-auth
authphpv3.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JwtAuthentication
use Tuupola\Middleware\JwtAuthentication;

Add JWT authentication middleware to a Slim application.

<?php require 'vendor/autoload.php'; use Tuupola\Middleware\JwtAuthentication; $app = new \Slim\App(); $app->add(new JwtAuthentication([ "secret" => "supersecretkeyyoushouldnotcommit" ])); $app->get('/protected', function ($request, $response) { return $response->write('Protected route'); }); $app->run();
Debug
Known issues
breakingVersion 3.x uses a different configuration format than 2.x.
fix
Check migration guide if upgrading from 2.x.
affects: >=3.0.0
Upgrade
Version history
3.8.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
18
Resources
tuupola-slim-jwt-auth — pip install tuupola-slim-jwt-auth · libregistry