update 登录鉴权修改

This commit is contained in:
yyb
2026-01-14 15:53:42 +08:00
parent a1754b7f4c
commit 65defd4dbd

View File

@@ -66,6 +66,9 @@ public class LoginInterceptor implements HandlerInterceptor {
*/
private boolean isValidToken(String token) {
System.out.println("token:"+token);
if (token == null){
throw new AuthException("用户未登录");
}
String userEmail = JwtUtils.getUserName(token);
String getUserId = JwtUtils.getUserId(token);
//1.把userEmail存入ThreadLocal 本地线程变量中