From c6619e68a4ccb056201da91c2107063c3e9e5ff7 Mon Sep 17 00:00:00 2001 From: bayuzhen Date: Wed, 28 Aug 2024 22:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A9=E8=9E=8D=E4=BF=A1?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=8E=A5=E5=8F=A3=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bocloud/sms/service/TrxServiceImpl.java | 28 +++++++++++++++++-- .../com/bocloud/sms/model/TrxAuthModel.java | 6 ++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java index ec23661..c5a8896 100644 --- a/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java +++ b/bocloud.sms.service/src/main/java/com/bocloud/sms/service/TrxServiceImpl.java @@ -85,8 +85,32 @@ public class TrxServiceImpl implements TrxService { String url = trxUrl + "/userAuthen"; Map paramsMap = new HashMap<>(); paramsMap.put("cookie", trxAuthModel.getClientHello()); - paramsMap.put("certMd5", trxAuthModel.getServerHello()); - paramsMap.put("client_ip", trxAuthModel.getClientIp()); + + List> authen = new ArrayList<>(); + Map userMap = new HashMap<>(); + userMap.put("loginName", trxAuthModel.getLoginName()); + userMap.put("passwd", trxAuthModel.getPasswd()); + authen.add(userMap); + + Map md5Map = new HashMap<>(); + md5Map.put("certMd5", trxAuthModel.getServerHello()); + md5Map.put("value", ""); + md5Map.put("hashType", ""); + authen.add(md5Map); + + Map passcodeMap = new HashMap<>(); + passcodeMap.put("passcode", ""); + authen.add(passcodeMap); + + Map dfCodeMap = new HashMap<>(); + dfCodeMap.put("df_code", ""); + authen.add(dfCodeMap); + + Map ipMap = new HashMap<>(); + ipMap.put("client_ip", trxAuthModel.getClientIp()); + authen.add(ipMap); + paramsMap.put("Authen", authen); + JSONObject result = new JSONObject(); GeneralResult> login = new GeneralResult<>(); try { diff --git a/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java b/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java index 399f292..51f527e 100644 --- a/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java +++ b/bocloud.sms.storage/src/main/java/com/bocloud/sms/model/TrxAuthModel.java @@ -4,8 +4,10 @@ import lombok.Data; @Data public class TrxAuthModel { - private String clientHello; - private String serverHello; + private String loginName; + private String passwd; + private String clientHello; // cookie + private String serverHello; // certMd5 private String trxToken; private String clientIp; }