| | |
| | | .headerMap(header, false) |
| | | .body(json.toString()) |
| | | .execute().body(); |
| | | log.info("[浪潮SSO] appAuthCheck 返回: {}", body); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | return jsonObject.get("data").toString(); |
| | | Object data = jsonObject == null ? null : jsonObject.get("data"); |
| | | return data == null ? null : data.toString(); |
| | | } |
| | | |
| | | // 获取用户信息 |
| | |
| | | .headerMap(header, false) |
| | | .body(json.toString()) |
| | | .execute().body(); |
| | | log.info("[浪潮SSO] getUserInfoByToken 返回: {}", body); |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | return JSONObject.parseObject(jsonObject.get("data").toString()); |
| | | Object data = jsonObject == null ? null : jsonObject.get("data"); |
| | | if (data == null) { |
| | | return null; |
| | | } |
| | | String dataStr = data.toString(); |
| | | if (dataStr.isEmpty() || "null".equalsIgnoreCase(dataStr)) { |
| | | return null; |
| | | } |
| | | return JSONObject.parseObject(dataStr); |
| | | } |
| | | |
| | | public static JSONObject getResult(Integer code, String msg, Object data) { |