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