|
@@ -1,6 +1,7 @@
|
|
|
package com.central.modules.webservice.controller;
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.central.common.Constant;
|
|
|
import com.central.common.Result;
|
|
@@ -123,9 +124,16 @@ public class WebserviceController {
|
|
|
String identityTicket = param.get("identityTicket");
|
|
|
String appServerID = param.get("appServerID");
|
|
|
String XMLStr = WSService.verifyIdentityTicket(challenge, identityTicket, appServerID);
|
|
|
- log.info("证书登录成功");
|
|
|
- String jsonStr = XMLUtil.xml2Json(JSONObject.parseObject(XMLStr).getString("result")) ;
|
|
|
- String userName = JSONObject.parseObject(jsonStr).getJSONObject("userinfo").getString("name");
|
|
|
+ String jsonStr = XMLUtil.xml2Json(JSONObject.parseObject(XMLStr).getString("result"));
|
|
|
+ log.info("证书网关接口返回内容为:" + jsonStr+",发送参数为"+JSON.toJSONString(param));
|
|
|
+ JSONObject responseObj = JSONObject.parseObject(jsonStr);
|
|
|
+ if("-1".equals(responseObj.getString("result"))){
|
|
|
+ return Result.error("证书网关登录失败,"+responseObj.getString("error"));
|
|
|
+ }
|
|
|
+ String userName = responseObj.getJSONObject("userinfo").getString("name");
|
|
|
+ if(StringUtils.isEmpty(userName)){
|
|
|
+ return Result.error("应用系统userName获取失败,请稍候重试");
|
|
|
+ }
|
|
|
String appToken = appService.getAppToken(request, requestUuid, "/idaas/sso/smslogin");
|
|
|
if(appToken == null){
|
|
|
log.info("APPToken 为空!");
|