mirror of
https://gitee.com/ctexthuang/hyperf_rbac_framework_server_ctexthuang.git
synced 2025-12-25 17:07:49 +08:00
feat : jwt
This commit is contained in:
32
app/Controller/Admin/AdminUserController.php
Normal file
32
app/Controller/Admin/AdminUserController.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user