2025-07-01 19:39:13 +08:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* This file is part of webman.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under The MIT License
|
|
|
|
|
* For full copyright and license information, please see the MIT-LICENSE.txt
|
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
|
*
|
|
|
|
|
* @author walkor<walkor@workerman.net>
|
|
|
|
|
* @copyright walkor<walkor@workerman.net>
|
|
|
|
|
* @link http://www.workerman.net/
|
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
use Webman\Route;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 当前路由规则:/{业务域}/{模块}/{操作} (可扩展:/{业务域}/{版本号}/{模块}/{操作})
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 管理后台 API 样例
|
|
|
|
|
// GET /admin/user/{user_id}/tokens // 返回用户token+元信息
|
|
|
|
|
// POST /admin/user/{user_id}/kickout // body: {"tokens": ["..."]} // 踢下线
|
|
|
|
|
// POST /admin/user/{user_id}/kickout_all // 一键踢全部
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Route::group('/common', function () {
|
|
|
|
|
Route::group('/auth', function () {
|
2025-07-09 17:58:30 +08:00
|
|
|
Route::any('/login', [app\common\controller\AuthController::class, 'login']);
|
|
|
|
|
Route::any('/register', [app\common\controller\AuthController::class, 'register']);
|
|
|
|
|
Route::any('/feishu/scope', [app\common\controller\AuthController::class, 'feishuScope']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 调试
|
|
|
|
|
Route::any('/feishu/auth', [app\common\controller\AuthController::class, 'feishuAuth']);
|
2025-07-01 19:39:13 +08:00
|
|
|
});
|
|
|
|
|
});
|