Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 850 Bytes

rest.md

File metadata and controls

45 lines (31 loc) · 850 Bytes
layout title order repo
page
REST
6
rest

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)