KJB_ROOTLESS_ARRAY -> DJB_ROOTLESS_ARRAY 변경
This commit is contained in:
+5
-5
@@ -28,7 +28,7 @@ import com.eactive.eai.common.util.Logger;
|
|||||||
|
|
||||||
public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
|
public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
|
||||||
|
|
||||||
static final String KJB_ROOTLESS_ARRAY = "{ \"KJB_ROOTLESS_ARRAY\" : ";
|
static final String DJB_ROOTLESS_ARRAY = "{ \"DJB_ROOTLESS_ARRAY\" : ";
|
||||||
|
|
||||||
static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
|
static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
|
||||||
|
|
||||||
@@ -63,8 +63,8 @@ public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
|
|||||||
String chkBody = inboundBody;
|
String chkBody = inboundBody;
|
||||||
String clientSecret = assignClientSecret(prop, request);
|
String clientSecret = assignClientSecret(prop, request);
|
||||||
|
|
||||||
if (chkBody.startsWith(KJB_ROOTLESS_ARRAY)) {
|
if (chkBody.startsWith(DJB_ROOTLESS_ARRAY)) {
|
||||||
chkBody = chkBody.substring(KJB_ROOTLESS_ARRAY.length());
|
chkBody = chkBody.substring(DJB_ROOTLESS_ARRAY.length());
|
||||||
|
|
||||||
if (chkBody.endsWith("}")) {
|
if (chkBody.endsWith("}")) {
|
||||||
chkBody = chkBody.substring(0, chkBody.length() - 1);
|
chkBody = chkBody.substring(0, chkBody.length() - 1);
|
||||||
@@ -161,8 +161,8 @@ public class HmacSha256VerifyFilterKjb implements HttpAdapterFilter {
|
|||||||
|
|
||||||
Object root = JSONValue.parse(outboundBody);
|
Object root = JSONValue.parse(outboundBody);
|
||||||
|
|
||||||
if (root instanceof JSONObject && ((JSONObject) root).containsKey("KJB_ROOTLESS_ARRAY")) {
|
if (root instanceof JSONObject && ((JSONObject) root).containsKey("DJB_ROOTLESS_ARRAY")) {
|
||||||
JSONArray jsonArray = (JSONArray) ((JSONObject) root).get("KJB_ROOTLESS_ARRAY");
|
JSONArray jsonArray = (JSONArray) ((JSONObject) root).get("DJB_ROOTLESS_ARRAY");
|
||||||
outboundBody = jsonArray.toJSONString();
|
outboundBody = jsonArray.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -194,7 +194,7 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport
|
|||||||
Object root = JSONValue.parse(body);
|
Object root = JSONValue.parse(body);
|
||||||
if( root instanceof JSONArray ) {
|
if( root instanceof JSONArray ) {
|
||||||
JSONObject wrappedObject = new JSONObject();
|
JSONObject wrappedObject = new JSONObject();
|
||||||
wrappedObject.put("KJB_ROOTLESS_ARRAY", root);
|
wrappedObject.put("DJB_ROOTLESS_ARRAY", root);
|
||||||
requestBytes = wrappedObject.toJSONString().getBytes(encode);
|
requestBytes = wrappedObject.toJSONString().getBytes(encode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ public class HttpAdapterServiceStandard extends HttpAdapterServiceSupport
|
|||||||
Object root = JSONValue.parse(responseData);
|
Object root = JSONValue.parse(responseData);
|
||||||
if( root instanceof JSONObject ) {
|
if( root instanceof JSONObject ) {
|
||||||
JSONObject wrappedObject = (JSONObject) root;
|
JSONObject wrappedObject = (JSONObject) root;
|
||||||
responseData = wrappedObject.get("KJB_ROOTLESS_ARRAY").toString();
|
responseData = wrappedObject.get("DJB_ROOTLESS_ARRAY").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user