Async input 에 대한 ack msg암호화적용
This commit is contained in:
@@ -147,8 +147,13 @@ public class ApiAdapterController implements HttpAdapterServiceKey {
|
||||
// 업체별 aync response message 가 다르다.
|
||||
String asyncMsgStyle = httpProp.getProperty("ASYNC_RTNMSG_TYPE", "");
|
||||
String responseBody ="";
|
||||
boolean encryptAsyncAckApply = StringUtils.equalsIgnoreCase(httpProp.getProperty("ASYNC_ENCRYPT_ACK", "N"), "Y");
|
||||
|
||||
if (asyncMsgStyle == null || asyncMsgStyle.trim().isEmpty()) {
|
||||
responseBody = makeResponseBodyMsg();
|
||||
responseBody = makeResponseBodyMsg();
|
||||
if ( encryptAsyncAckApply) {
|
||||
responseBody = service.doPostEncryption(responseBody, transactionProp, servletRequest);
|
||||
}
|
||||
} else {
|
||||
responseBody = asyncMsgStyle;
|
||||
}
|
||||
|
||||
@@ -329,8 +329,11 @@ public class ApiAdapterService extends HttpAdapterServiceSupport {
|
||||
}
|
||||
|
||||
// KJBank는 요청에 대한 응답 (Sync응답, Aync 에 대한 Ack응답) 에 대하여 암호화 하지 않는다. 무조건 안한다. 따라서 아래부분은 구현은 했지만 사용하지 않는다.
|
||||
// 위 2가지 경우 암호화 하는걸로 요청 변경되어 아래 암호화 수행하도록 수정함
|
||||
encryptResponseApply = StringUtils.equalsIgnoreCase(httpProp.getProperty("ENCRYPT_RESPONSE_APPLY", "N"), "Y");
|
||||
result = doPostEncryption(result, transactionProp, request); // jwhong Encrypt
|
||||
if ( encryptResponseApply) {
|
||||
result = doPostEncryption(result, transactionProp, request); // jwhong Encrypt
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -384,11 +387,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport {
|
||||
|
||||
|
||||
// jwhong encrypt
|
||||
private String doPostEncryption(String eaiBody, Properties transactionProp, HttpServletRequest request) throws Exception {
|
||||
|
||||
if ( !encryptResponseApply) {
|
||||
return eaiBody;
|
||||
}
|
||||
public String doPostEncryption(String eaiBody, Properties transactionProp, HttpServletRequest request) throws Exception {
|
||||
|
||||
String decryptAlgorithm = transactionProp.getProperty(ENCRYPT_ALGORITHM, "");
|
||||
String xElinkClientId = transactionProp.getProperty(HEADER_NAME_CLIENT_ID, ""); // 이 값이 OAuth의 client id 값이다 . http header 에 포함되어 온다. jwhong
|
||||
|
||||
Reference in New Issue
Block a user