Simple wrapper around JWT middleware for seamless integration with WTF.
Install
composer require wtf/rest
Configure your app
Create config file jwt.php
:
<?php
declare(strict_types=1);
return [
"path" => "/api",
"passthrough" => ["/api/login"],
"secret" => getenv('APP_SECRET'),
];
Documentation: tuupola/slim-jwt-auth
Add new provider and middleware
\Wtf\Rest\Provider
into your providers list (suit.php
config)jwt_middleware
into your middlewares list (suit.php
config)