[feat] 验证令牌

pull/445/head
hsdllcw 2025-02-24 12:00:27 +08:00
parent 343e5496e3
commit f2adbaf5cc
2 changed files with 16 additions and 5 deletions

View File

@ -2,10 +2,8 @@ package com.ruoyi.auth.controller;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.auth.form.LoginBody; import com.ruoyi.auth.form.LoginBody;
import com.ruoyi.auth.form.RegisterBody; import com.ruoyi.auth.form.RegisterBody;
import com.ruoyi.auth.service.SysLoginService; import com.ruoyi.auth.service.SysLoginService;
@ -75,4 +73,17 @@ public class TokenController
sysLoginService.register(registerBody.getUsername(), registerBody.getPassword()); sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
return R.ok(); return R.ok();
} }
/**
*
*
*
* @return ResponseEntity:
*/
@RequestMapping("verify")
public ResponseEntity<?> verifyToken() {
// 返回一个HTTP 200 OK响应表示令牌有效
return ResponseEntity.ok().build();
}
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.6.5.0.4", "version": "3.6.5",
"description": "若依管理系统", "description": "若依管理系统",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",