From 68b0d9b52145056045b36028d1d621da1c3f2ea1 Mon Sep 17 00:00:00 2001 From: kongzy <kongzy> Date: 星期五, 20 九月 2024 15:38:29 +0800 Subject: [PATCH] 登录加密 --- safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/accountController/LoginController.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/accountController/LoginController.java b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/accountController/LoginController.java index c7b3ca3..caf8ad2 100644 --- a/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/accountController/LoginController.java +++ b/safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/accountController/LoginController.java @@ -1,5 +1,6 @@ package com.gkhy.safePlatform.accountController; +import cn.hutool.core.codec.Base64; import com.alibaba.fastjson.JSONObject; import com.gkhy.safePlatform.account.rpc.apimodel.AccountAuthService; import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.MenuRPCRespDTO; @@ -28,12 +29,13 @@ public ResultVO<UserLoginRPCRespDTO> authLogin(@RequestBody JSONObject loginForm){ String username = loginForm.getString("username"); String password = loginForm.getString("password"); + password= Base64.decodeStr(password); return accountAuthService.authLogin(username, password); } @RequestMapping("/menu") public ResultVO<List<MenuRPCRespDTO>> getMenu(Authentication authentication, Long projectId){ ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); - return accountAuthService.getMenu(currentUser.getUid(), projectId); + return accountAuthService.getMenu(currentUser, projectId); } } -- Gitblit v1.9.2