[feat] 验证令牌
parent
343e5496e3
commit
f2adbaf5cc
|
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue