feat : jwt

This commit is contained in:
2025-09-12 18:12:30 +08:00
parent a80c237bbb
commit ff3e0105ec
14 changed files with 362 additions and 38 deletions

View File

@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Controller\Admin;
use App\Annotation\ResponseFormat;
use App\Middleware\Token\AdminTokenMiddleware;
use App\Service\Admin\AdminUser\UserService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
#[Controller(prefix: "admin/adminUser")]
#[ResponseFormat('admin')]
#[Middleware(AdminTokenMiddleware::class)]
class AdminUserController
{
#[RequestMapping(path: "getInfo", methods: "GET")]
public function getInfo()
{
return (new UserService)->handle();
}
#[RequestMapping(path: "refresh", methods: "POST")]
public function refresh()
{
return (new UserService)->refresh();
}
}