REST (source)

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

  1. \Wtf\Rest\Provider into your providers list (suit.php config)
  2. jwt_middleware into your middlewares list (suit.php config)