Skip to content

REST API module for WTF Framework

License

Notifications You must be signed in to change notification settings

frameworkwtf/rest

Repository files navigation

REST module

Build Status Coverage Status

Installation

Install via Composer

composer require wtf/rest

Configure your app

Create config file jwt.php:

<?php

declare(strict_types=1);

return [
	"path" => "/api",
	"passthrough" => ["/api/login"],
	"secret" => 'JWT_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)