完成登录校验

This commit is contained in:
none
2023-02-17 12:07:15 +08:00
parent 24a9db11c1
commit bd5cf234f1
15 changed files with 232 additions and 79 deletions

View File

@@ -23,6 +23,18 @@ public class RequestUtil {
return null;
}
public static String token() {
HttpServletRequest request = RequestUtil.handler();
if (request == null) {
return "";
}
String token = request.getHeader("Authorization");
if (token == null || token.length() == 0 || token.split(" ").length != 2) {
return "";
}
return token.split(" ")[1];
}
/**
* 获取不带参请求URl
* 示例: https://127.0.0.1:8082/api/system/menu/menus