NiceOn 업무요청 수정
This commit is contained in:
+25
-7
@@ -7,6 +7,7 @@ import java.net.ConnectException;
|
|||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -729,7 +730,8 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
private void setNiceOnAuthHeaders(HttpUriRequestBase method, String auth) throws Exception {
|
private void setNiceOnAuthHeaders(HttpUriRequestBase method, String auth) throws Exception {
|
||||||
method.setHeader("Authorization",
|
method.setHeader("Authorization",
|
||||||
String.format("%s %s", AccessTokenVO.BEARER_TYPE, auth)); // 나이스지키미 format임
|
String.format("%s %s", AccessTokenVO.BEARER_TYPE, auth)); // 나이스지키미 format임
|
||||||
method.setHeader("ProductID", "2303345072");
|
String productId = PropManager.getInstance().getProperty("NiceOnProperty","productId.value");
|
||||||
|
method.setHeader("ProductID", productId);
|
||||||
//method.setHeader("Authorization",
|
//method.setHeader("Authorization",
|
||||||
// String.format("%s %s", AccessTokenVO.BEARER_TYPE, accessToken.getAccessToken()));
|
// String.format("%s %s", AccessTokenVO.BEARER_TYPE, accessToken.getAccessToken()));
|
||||||
}
|
}
|
||||||
@@ -1101,11 +1103,27 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
if (encryptAlgorithm.equals("AES256-NICEON")) {
|
||||||
map.put(encryptedJsonKey, encryptedMessage);
|
String goodsCls = PropManager.getInstance().getProperty("NiceOnProperty","goods.cls.value");
|
||||||
JSONObject json = new JSONObject();
|
Map<String, Object> map = new HashMap<>();
|
||||||
json.putAll(map);
|
SimpleDateFormat sdfDateTime =new SimpleDateFormat("yyyyMMddHHmmss");
|
||||||
return json.toJSONString();
|
map.put("req_dtm", sdfDateTime);
|
||||||
|
map.put("goods_cls", goodsCls);
|
||||||
|
map.put(encryptedJsonKey, encryptedMessage);
|
||||||
|
JSONObject dataBody = new JSONObject();
|
||||||
|
dataBody.putAll(map);
|
||||||
|
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("dataBody", dataBody);
|
||||||
|
return json.toJSONString();
|
||||||
|
} else {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put(encryptedJsonKey, encryptedMessage);
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.putAll(map);
|
||||||
|
return json.toJSONString();
|
||||||
|
}
|
||||||
|
|
||||||
//return encryptedMessage;
|
//return encryptedMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1303,7 +1321,7 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
jsonKey = "encryptedData";
|
jsonKey = "encryptedData";
|
||||||
break;
|
break;
|
||||||
case "AES256-NICEON":
|
case "AES256-NICEON":
|
||||||
jsonKey = "preScreeningRequest";
|
jsonKey = "enc_data";
|
||||||
break;
|
break;
|
||||||
case "AES256GCM":
|
case "AES256GCM":
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user