修改F5登录

main
grimm 2025-04-16 22:36:45 +08:00
parent b794196637
commit 6d4d2ec01d
1 changed files with 17 additions and 5 deletions

View File

@ -596,10 +596,8 @@ public class SdkVerfy {
try {
// 请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("super_user_id", userId);
params.put("token", sdktoken);
params.put("appId", Constant.F5_APPID);
String osign = MD5Util.encrypByMd5(Constant.F5_APPID + sdktoken + Constant.F5_SECURE_KEY);
params.put("osign", osign);
// String jsonStr = JSON.toJSONString(params);
String resurl = HttpUtil.postForm(Constant.SUPER_VERIFY_URL, params);
JSONObject jsonObject = JSONObject.fromObject(resurl);
@ -608,7 +606,6 @@ public class SdkVerfy {
if (jsonObject.getInt("code") == 200) {
return userId;
}
return jsonObject.getString("msg");
} catch (Exception e) {
e.printStackTrace();
}
@ -625,8 +622,10 @@ public class SdkVerfy {
try {
// 请求参数
Map<String, String> params = new HashMap<String, String>();
params.put("super_user_id", userId);
params.put("token", sdktoken);
params.put("appId", Constant.F5_APPID);
String osign = MD5Util.encrypByMd5(Constant.F5_APPID + sdktoken + Constant.F5_SECURE_KEY);
params.put("osign", osign);
// String jsonStr = JSON.toJSONString(params);
String resurl = HttpUtil.postForm(Constant.F5_VERIFY_URL, params);
JSONObject jsonObject = JSONObject.fromObject(resurl);
@ -635,9 +634,22 @@ public class SdkVerfy {
if (jsonObject.getInt("code") == 200) {
return userId;
}
return jsonObject.getString("msg");
} catch (Exception e) {
e.printStackTrace();
}
return "-1";
}
public static void main(String[] args) throws IOException {
Map<String, String> params = new HashMap<String, String>();
params.put("token", "1_o1ioab9ktedQF3Lj5SkinbGOt9GexZX1");
params.put("appId", Constant.F5_APPID);
String osign = MD5Util.encrypByMd5(Constant.F5_APPID + "1_o1ioab9ktedQF3Lj5SkinbGOt9GexZX1" + Constant.F5_SECURE_KEY);
params.put("osign", osign);
// String jsonStr = JSON.toJSONString(params);
String resurl = HttpUtil.postForm(Constant.F5_VERIFY_URL, params);
JSONObject jsonObject = JSONObject.fromObject(resurl);
LOGGER.info("res:{}", jsonObject.toString());
}
}