From 85c5fafda53f21697499ff0587ff6dc0f2b00f0a Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 16 三月 2023 09:34:20 +0800
Subject: [PATCH] 更新前后端分离部署文档
---
src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java b/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
index 9690c6d..d26342e 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
@@ -11,6 +11,9 @@
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+/**
+ * @author lin
+ */
@Component
public class LoginSuccessHandler implements AuthenticationSuccessHandler {
@@ -18,7 +21,16 @@
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException {
- String username = request.getParameter("username");
- logger.info("[鐧诲綍鎴愬姛] - [{}]", username);
+// String username = request.getParameter("username");
+// httpServletResponse.setContentType("application/json;charset=UTF-8");
+// // 鐢熸垚JWT锛屽苟鏀剧疆鍒拌姹傚ご涓�
+// String jwt = JwtUtils.createToken(authentication.getName(), );
+// httpServletResponse.setHeader(JwtUtils.getHeader(), jwt);
+// ServletOutputStream outputStream = httpServletResponse.getOutputStream();
+// outputStream.write(JSON.toJSONString(ErrorCode.SUCCESS).getBytes(StandardCharsets.UTF_8));
+// outputStream.flush();
+// outputStream.close();
+
+// logger.info("[鐧诲綍鎴愬姛] - [{}]", username);
}
}
--
Gitblit v1.8.0