wtf/rest

WTF 框架的包

1.0.4 2018-04-06 07:07 UTC

This package is auto-updated.

Last update: 2024-09-13 22:38:35 UTC


README

Build Status Coverage Status

安装

通过 Composer 安装

composer require wtf/rest

配置您的应用程序

创建配置文件 jwt.php

<?php

declare(strict_types=1);

return [
	"path" => "/api",
	"passthrough" => ["/api/login"],
	"secret" => 'JWT_SECRET',
];

文档: tuupola/slim-jwt-auth

添加新的提供者和中间件

  1. \Wtf\Rest\Provider 到您的提供者列表中(suit.php 配置)
  2. jwt_middleware 到您的中间件列表中(suit.php 配置)