Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ebeaa6af17 | |||
| 133c482ef8 | |||
| f72348ae67 | |||
| 704a9ff90e | |||
| db78cbac2e | |||
| 403b201168 | |||
| ec0cdfd221 | |||
| d277e37798 | |||
| e4851999ba | |||
| 110b0c0039 | |||
| d85642c5a8 | |||
| 49620c5e21 |
Vendored
+5
-7
@@ -1,10 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'djb-vm' }
|
agent { label 'djb-vm' }
|
||||||
|
|
||||||
triggers {
|
|
||||||
pollSCM('H/10 * * * *')
|
|
||||||
}
|
|
||||||
|
|
||||||
options {
|
options {
|
||||||
timestamps()
|
timestamps()
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
@@ -72,10 +68,11 @@ pipeline {
|
|||||||
sh '''
|
sh '''
|
||||||
set -eu
|
set -eu
|
||||||
cd build/libs
|
cd build/libs
|
||||||
sha1sum eapim-online.war > SHA1SUMS
|
sha1sum eapim-online.war > eapim-online.war.sha1
|
||||||
sha256sum eapim-online.war > SHA256SUMS
|
sha256sum eapim-online.war > eapim-online.war.sha256
|
||||||
|
md5sum eapim-online.war > eapim-online.war.md5
|
||||||
'''
|
'''
|
||||||
archiveArtifacts artifacts: 'build/libs/eapim-online.war,build/libs/SHA1SUMS,build/libs/SHA256SUMS', fingerprint: true
|
archiveArtifacts artifacts: 'build/libs/eapim-online.war,build/libs/eapim-online.war.sha1,build/libs/eapim-online.war.sha256,build/libs/eapim-online.war.md5', fingerprint: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,4 +159,5 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.eactive.eai.adapter.AdapterVO;
|
|||||||
import com.eactive.eai.adapter.handler.AdapterErrorMessageHandler;
|
import com.eactive.eai.adapter.handler.AdapterErrorMessageHandler;
|
||||||
import com.eactive.eai.adapter.handler.AdapterErrorMessageHandlerFactory;
|
import com.eactive.eai.adapter.handler.AdapterErrorMessageHandlerFactory;
|
||||||
import com.eactive.eai.adapter.http.HttpStatusException;
|
import com.eactive.eai.adapter.http.HttpStatusException;
|
||||||
|
import com.eactive.eai.adapter.http.client.HttpClientAdapterServiceKey;
|
||||||
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey;
|
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceKey;
|
||||||
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceSupport;
|
import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceSupport;
|
||||||
import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterManager;
|
import com.eactive.eai.adapter.http.dynamic.HttpDynamicInAdapterManager;
|
||||||
@@ -136,29 +137,36 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
||||||
|
|
||||||
String errorMsg = null;
|
String responseErrorMsg = null;
|
||||||
|
|
||||||
errorMsg = genErrorResponseMessage(adapterGroupName, adapterName,
|
|
||||||
transactionProp, e, adptMsgType, encode, errorResponseFormat);
|
|
||||||
if (e instanceof FilterException) {
|
if (e instanceof FilterException) {
|
||||||
|
responseErrorMsg = genErrorResponseMessage(adapterGroupName, adapterName,
|
||||||
|
transactionProp, MessageUtil.ERROR_CODE_AP_ERROR, e, adptMsgType, encode, errorResponseFormat);
|
||||||
FilterException e1 = (FilterException) e;
|
FilterException e1 = (FilterException) e;
|
||||||
this.logError(servletRequest, uuid, adapterGroupName, e1.getCode(), errorMsg, transactionProp, e);
|
this.logError(servletRequest, adapterGroupName, e1.getCode(), responseErrorMsg, transactionProp, e);
|
||||||
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage());
|
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage());
|
||||||
responseEntity = ResponseEntity.status(e1.getStatus()).contentType(mediaType).body(errorMsg);
|
responseEntity = ResponseEntity.status(e1.getStatus()).contentType(mediaType).body(responseErrorMsg);
|
||||||
} else if (e instanceof JwtAuthException) {
|
} else if (e instanceof JwtAuthException) {
|
||||||
|
responseErrorMsg = genErrorResponseMessage(adapterGroupName, adapterName,
|
||||||
|
transactionProp, MessageUtil.ERROR_CODE_AP_ERROR, e, adptMsgType, encode, errorResponseFormat);
|
||||||
JwtAuthException e1 = (JwtAuthException) e;
|
JwtAuthException e1 = (JwtAuthException) e;
|
||||||
this.logError(servletRequest, uuid, adapterGroupName, e1.getCode(), errorMsg, transactionProp, e);
|
this.logError(servletRequest, adapterGroupName, e1.getCode(), responseErrorMsg, transactionProp, e);
|
||||||
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
||||||
responseEntity = ResponseEntity.status(HttpStatus.UNAUTHORIZED).contentType(mediaType).body(errorMsg);
|
responseEntity = ResponseEntity.status(HttpStatus.UNAUTHORIZED).contentType(mediaType).body(responseErrorMsg);
|
||||||
} else if (e instanceof HttpStatusException) {
|
} else if (e instanceof HttpStatusException) {
|
||||||
|
responseErrorMsg = genErrorResponseMessage(adapterGroupName, adapterName,
|
||||||
|
transactionProp, MessageUtil.ERROR_CODE_AUTH_FAIL, e, adptMsgType, encode, errorResponseFormat);
|
||||||
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage());
|
logger.error("ApiAdapterController] " + adapterGroupName + "-" + adapterName + ">>" + e.getMessage());
|
||||||
HttpStatusException e1 = (HttpStatusException) e;
|
HttpStatusException e1 = (HttpStatusException) e;
|
||||||
responseEntity = ResponseEntity.status(e1.getStatus()).contentType(mediaType).body(errorMsg);
|
responseEntity = ResponseEntity.status(e1.getStatus()).contentType(mediaType).body(responseErrorMsg);
|
||||||
} else {
|
} else {
|
||||||
|
responseErrorMsg = genErrorResponseMessage(adapterGroupName, adapterName,
|
||||||
|
transactionProp, MessageUtil.ERROR_CODE_AP_ERROR, e, adptMsgType, encode, errorResponseFormat);
|
||||||
|
this.logError(servletRequest, adapterGroupName, MessageUtil.ERROR_CODE_AP_ERROR, responseErrorMsg, transactionProp, e);
|
||||||
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
logger.error(adapterGroupName + "-" + adapterName + ">>" + e.getMessage(), e);
|
||||||
responseEntity = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).contentType(mediaType).body(errorMsg);
|
responseEntity = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).contentType(mediaType).body(responseErrorMsg);
|
||||||
}
|
}
|
||||||
responseData = errorMsg;
|
responseData = responseErrorMsg;
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
/**
|
/**
|
||||||
@@ -178,7 +186,7 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String genErrorResponseMessage(String adapterGroupName, String adapterName,
|
private String genErrorResponseMessage(String adapterGroupName, String adapterName,
|
||||||
Properties callProp, Throwable e, String adptMsgType, String encode, String errorResponseFormat) {
|
Properties callProp, String code, Throwable e, String adptMsgType, String encode, String errorResponseFormat) {
|
||||||
String errorHandlerClass = AdapterPropManager.getInstance().getProperty(adapterName, "ERR_MSG_HANDLER");
|
String errorHandlerClass = AdapterPropManager.getInstance().getProperty(adapterName, "ERR_MSG_HANDLER");
|
||||||
if (StringUtils.isNotBlank(errorHandlerClass)) {
|
if (StringUtils.isNotBlank(errorHandlerClass)) {
|
||||||
if (logger.isInfo())
|
if (logger.isInfo())
|
||||||
@@ -187,6 +195,7 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
Object resposne;
|
Object resposne;
|
||||||
try {
|
try {
|
||||||
|
callProp.put("INBOUND_RESULT_CODE", code);
|
||||||
resposne = handler.generateNonStandardInboundErrorResponseMessage(adapterGroupName, adapterName,
|
resposne = handler.generateNonStandardInboundErrorResponseMessage(adapterGroupName, adapterName,
|
||||||
callProp, null, null, e);
|
callProp, null, null, e);
|
||||||
return (String)resposne;
|
return (String)resposne;
|
||||||
@@ -197,7 +206,7 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode,
|
return MessageUtil.makeErrorMessageByMessageType(adptMsgType, encode,
|
||||||
MessageUtil.ERROR_CODE_AP_ERROR, e.getMessage(), errorResponseFormat);
|
code, e.getMessage(), errorResponseFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -250,21 +259,14 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
String errorCode = "RECEAIIRP010";
|
String errorCode = "RECEAIIRP010";
|
||||||
String[] msgArgs = new String[1];
|
String[] msgArgs = new String[1];
|
||||||
msgArgs[0] = request.getRequestURI();
|
msgArgs[0] = request.getRequestURI();
|
||||||
EAIServerManager eaiServerManager = EAIServerManager.getInstance();
|
this.logError(request, "HTTP_IN_NO_URI", errorCode,
|
||||||
String serverName = eaiServerManager.getLocalServerName();
|
|
||||||
|
|
||||||
String instanceid1 = serverName.substring(0, 2);
|
|
||||||
String instanceid2 = serverName.substring(serverName.length() - 2, serverName.length());
|
|
||||||
String instid = instanceid1 + instanceid2;
|
|
||||||
String uuid = instid + UUIDGenerator.getUUID();
|
|
||||||
this.logError(request, uuid, "HTTP_IN_NO_URI", errorCode,
|
|
||||||
ExceptionUtil.make(new Exception("cat not find uri"), errorCode, msgArgs), null, null);
|
ExceptionUtil.make(new Exception("cat not find uri"), errorCode, msgArgs), null, null);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
logger.warn("inbound logging failed", t);
|
logger.warn("inbound logging failed", t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logError(HttpServletRequest request, String uuid, String adapterGroupName, String errorCode,
|
private void logError(HttpServletRequest request, String adapterGroupName, String errorCode,
|
||||||
String errorMsg, Properties prop, Exception e) {
|
String errorMsg, Properties prop, Exception e) {
|
||||||
try {
|
try {
|
||||||
EAIServerManager eaiServerManager = EAIServerManager.getInstance();
|
EAIServerManager eaiServerManager = EAIServerManager.getInstance();
|
||||||
@@ -272,7 +274,15 @@ public class DJBApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
|
|
||||||
InboundErrorInfoVO errorInfoVO = new InboundErrorInfoVO();
|
InboundErrorInfoVO errorInfoVO = new InboundErrorInfoVO();
|
||||||
|
|
||||||
errorInfoVO.setEaiSvcSno(uuid); // EAI서비스일련번호
|
String txId = prop.getProperty(TransactionContextKeys.TRANSACTION_UUID);
|
||||||
|
if (StringUtils.isEmpty(txId)) {
|
||||||
|
String instanceid1 = serverName.substring(0, 2);
|
||||||
|
String instanceid2 = serverName.substring(serverName.length() - 2, serverName.length());
|
||||||
|
String instid = instanceid1 + instanceid2;
|
||||||
|
txId = instid + UUIDGenerator.getUUID();
|
||||||
|
}
|
||||||
|
|
||||||
|
errorInfoVO.setEaiSvcSno(txId); // EAI서비스일련번호
|
||||||
errorInfoVO.setAdptBwkGrpNm(adapterGroupName); // 어댑터업무그룹명
|
errorInfoVO.setAdptBwkGrpNm(adapterGroupName); // 어댑터업무그룹명
|
||||||
errorInfoVO.setErrCd(errorCode); // 에러코드
|
errorInfoVO.setErrCd(errorCode); // 에러코드
|
||||||
errorInfoVO.setErrTxt(errorMsg); // 에러내용
|
errorInfoVO.setErrTxt(errorMsg); // 에러내용
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenCo
|
|||||||
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
|
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
|
||||||
import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory;
|
import org.springframework.security.oauth2.provider.token.store.KeyStoreKeyFactory;
|
||||||
|
|
||||||
|
import com.eactive.eai.agent.encryption.EncryptionManager;
|
||||||
import com.eactive.eai.authserver.dao.TokenIssuanceLogDAO;
|
import com.eactive.eai.authserver.dao.TokenIssuanceLogDAO;
|
||||||
import com.eactive.eai.authserver.jwt.PssJwtAccessTokenConverter;
|
import com.eactive.eai.authserver.jwt.PssJwtAccessTokenConverter;
|
||||||
import com.eactive.eai.authserver.service.OAuth2Manager;
|
import com.eactive.eai.authserver.service.OAuth2Manager;
|
||||||
@@ -131,10 +132,11 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
|
|||||||
String keyAlias = "elink-oauth";
|
String keyAlias = "elink-oauth";
|
||||||
String keyPassword = "elink1234";
|
String keyPassword = "elink1234";
|
||||||
if (vo != null) {
|
if (vo != null) {
|
||||||
keystorePath = vo.getProperty(PROP_KEYSTORE_PATH);
|
EncryptionManager encManager = EncryptionManager.getInstance();
|
||||||
keystorePassword = vo.getProperty(PROP_KEYSTORE_PW);
|
keystorePath = encManager.decryptDBData(vo.getProperty(PROP_KEYSTORE_PATH));
|
||||||
keyAlias = vo.getProperty(PROP_KEY_ALIAS);
|
keystorePassword = encManager.decryptDBData(vo.getProperty(PROP_KEYSTORE_PW));
|
||||||
keyPassword = vo.getProperty(PROP_KEY_PW);
|
keyAlias = encManager.decryptDBData(vo.getProperty(PROP_KEY_ALIAS));
|
||||||
|
keyPassword = encManager.decryptDBData(vo.getProperty(PROP_KEY_PW));
|
||||||
} else {
|
} else {
|
||||||
logger.warn("The properties has not been set.[" + PROP_GROUP_AUTH_SERVER + "]");
|
logger.warn("The properties has not been set.[" + PROP_GROUP_AUTH_SERVER + "]");
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-4
@@ -43,11 +43,10 @@ public class DouzoneEncFieldInCryptoFilter implements HttpAdapterFilter {
|
|||||||
|
|
||||||
private void setContext(Properties tempProp) {
|
private void setContext(Properties tempProp) {
|
||||||
Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
||||||
String empNm = inboundHeaders.getProperty("x-emp-nm");
|
|
||||||
tempProp.setProperty(InCryptoFilter.PROP_AAD_HEADER, empNm);
|
|
||||||
|
|
||||||
String chnlNm = inboundHeaders.getProperty("x-chnl-nm");
|
String chnlNm = inboundHeaders.getProperty("x-chnl-nm");
|
||||||
tempProp.setProperty(KeyDerivationStrategy.PARAM_CONTEXT_KEY, chnlNm);
|
tempProp.setProperty("x-chnl-nm", chnlNm);
|
||||||
|
|
||||||
|
tempProp.setProperty(InCryptoFilter.PROP_AAD_HEADER, "x-emp-nm");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package com.eactive.eai.custom.adapter.http.dynamic.filter;
|
||||||
|
|
||||||
|
import java.security.KeyStore;
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.crypto.SecretKey;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.json.simple.JSONObject;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
|
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilter;
|
||||||
|
import com.eactive.eai.common.hsm.HsmManager;
|
||||||
|
import com.eactive.eai.common.util.Logger;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
|
||||||
|
public class HSMKeyCryptoFilter implements HttpAdapterFilter {
|
||||||
|
|
||||||
|
private static final Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
|
||||||
|
|
||||||
|
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
try {
|
||||||
|
ObjectNode rootNode = null;
|
||||||
|
String jsonStr = null;
|
||||||
|
if (message instanceof String) {
|
||||||
|
jsonStr = (String) message;
|
||||||
|
} else if (message instanceof JSONObject) {
|
||||||
|
jsonStr = ((JSONObject) message).toJSONString();
|
||||||
|
} else {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
rootNode = (ObjectNode)OBJECT_MAPPER.readTree(jsonStr);
|
||||||
|
|
||||||
|
JsonNode hsmKeyAlias = rootNode.get("hsmKeyAlias");
|
||||||
|
if (hsmKeyAlias != null) {
|
||||||
|
String hsmKeyAliasValue = hsmKeyAlias.textValue();
|
||||||
|
KeyStore keyStore = HsmManager.getInstance().getKeyStore();
|
||||||
|
|
||||||
|
java.security.Key key = keyStore.getKey(hsmKeyAliasValue, null);
|
||||||
|
if (key instanceof SecretKey) {
|
||||||
|
SecretKey secretKey = (SecretKey) key;
|
||||||
|
byte[] encoded = secretKey.getEncoded();
|
||||||
|
if (encoded != null) {
|
||||||
|
String encBase64 = Base64.getEncoder().encodeToString(encoded);
|
||||||
|
logger.debug("HsmManager] HSM - {} : [{}]", hsmKeyAliasValue, encBase64);
|
||||||
|
rootNode.put("hsmKeyBase64", encBase64);
|
||||||
|
rootNode.put("hsmKeyRaw", new String(encoded));
|
||||||
|
} else {
|
||||||
|
logger.debug("HsmManager] HSM - secretKey null {} : [{}]", hsmKeyAliasValue, secretKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String jsonString = OBJECT_MAPPER.writeValueAsString(rootNode);
|
||||||
|
return jsonString;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new FilterException("HSM key 가져오기 실패", ERROR_PRE_FAIL, HttpStatus.INTERNAL_SERVER_ERROR.value(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object doPostFilter(String adptGrpName, String adptName, Object resultMessage, Properties prop,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
return resultMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.eactive.eai.custom.adapter.http.dynamic.filter;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
|
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilter;
|
||||||
|
import com.eactive.eai.common.util.JacksonUtil;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 카카오뱅크 암복호화에 맟추어 커스텀 필요
|
||||||
|
*/
|
||||||
|
public class KakaopayFilter implements HttpAdapterFilter {
|
||||||
|
|
||||||
|
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
JsonNode rootNode = JacksonUtil.readTree(message, OBJECT_MAPPER);
|
||||||
|
|
||||||
|
// term_agreements[0].is_agreed 값이 true 인지 확인
|
||||||
|
boolean firstAgreed = JacksonUtil.getBoolean(rootNode, "term_agreements[0].is_agreed", false);
|
||||||
|
|
||||||
|
if (!firstAgreed) {
|
||||||
|
throw new FilterException("EB000003", "금리한도조회실패 - 고객 요청으로 인한 CB 조회 실패", 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
return message;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object doPostFilter(String adptGrpName, String adptName, Object resultMessage, Properties prop,
|
||||||
|
HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
return resultMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
+297
@@ -0,0 +1,297 @@
|
|||||||
|
|
||||||
|
package com.eactive.eai.custom.authoutbound.client.impl;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.KeyStoreException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.security.UnrecoverableKeyException;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
|
||||||
|
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
|
||||||
|
import org.apache.hc.client5.http.impl.classic.HttpClients;
|
||||||
|
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
|
||||||
|
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
|
||||||
|
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
|
||||||
|
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
|
||||||
|
import org.apache.hc.client5.http.ssl.TrustAllStrategy;
|
||||||
|
import org.apache.hc.core5.http.HttpEntity;
|
||||||
|
import org.apache.hc.core5.http.HttpHost;
|
||||||
|
import org.apache.hc.core5.http.io.entity.EntityUtils;
|
||||||
|
import org.apache.hc.core5.ssl.SSLContextBuilder;
|
||||||
|
import org.apache.hc.core5.util.Timeout;
|
||||||
|
import org.springframework.security.web.util.UrlUtils;
|
||||||
|
|
||||||
|
import com.eactive.eai.adapter.AdapterGroupVO;
|
||||||
|
import com.eactive.eai.adapter.AdapterManager;
|
||||||
|
import com.eactive.eai.adapter.http.client.HttpClientAdapterServiceKey;
|
||||||
|
import com.eactive.eai.adapter.http.secure.HttpClient5SSLContextFactory;
|
||||||
|
import com.eactive.eai.authoutbound.OutboundOAuthCredentialVo;
|
||||||
|
import com.eactive.eai.authoutbound.client.HttpClientAccessTokenServiceByDB;
|
||||||
|
import com.eactive.eai.common.util.Logger;
|
||||||
|
import com.eactive.eai.httpouttlsinfo.HttpOutTlsInfoManager;
|
||||||
|
import com.eactive.eai.httpouttlsinfo.HttpOutTlsInfoVO;
|
||||||
|
import com.eactive.eai.util.TestModeChecker;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.openbanking.eai.common.token.AccessTokenVO;
|
||||||
|
import com.openbanking.eai.common.token.OAuth2AccessTokenVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. 기능 : HTTP 웹 컴포넌트를 POST 방식으로 호출할 수 있는 기능을 제공한다. 2. 처리 개요 : * - 2009.11.24
|
||||||
|
* retry 로직 제거 : 요청 3. 주의사항
|
||||||
|
*
|
||||||
|
* @author :
|
||||||
|
* @version : v 1.0.0
|
||||||
|
* @see : WLIAdapterFactory.java, WLIAdapter.java, WLIDefaultAdapter.java
|
||||||
|
* @since :
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DJBErpNsmapiAccessTokenService implements HttpClientAccessTokenServiceByDB {
|
||||||
|
|
||||||
|
public static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT);
|
||||||
|
|
||||||
|
private static boolean testMode = TestModeChecker.isTestMode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. 기능 : 법인검증 토큰 발급에 사용 2. 처리 개요 : - 속성 정보를 설정 하고 토큰 발급 URL 호출 한다. 3. 주의사항
|
||||||
|
* - JSON 방식
|
||||||
|
* - ( Header Authorization Basic <base64_Encode(client_id:client_secret)> ) 으로 구성
|
||||||
|
* @param adapterProp Http Adapter 속성 정보
|
||||||
|
* @return 반환 된 AccessTokenVO
|
||||||
|
* @exception Exception 수동 시스템 간 통신 중 발생
|
||||||
|
**/
|
||||||
|
public AccessTokenVO execute(String name, Properties adapterProp, OutboundOAuthCredentialVo oAuthCredentialVo)
|
||||||
|
throws Exception {
|
||||||
|
AdapterGroupVO gvo = AdapterManager.getInstance().getAdapterGroupVO(name);
|
||||||
|
String adapterUrl = adapterProp.getProperty("URL");
|
||||||
|
String encode = gvo.getMessageEncode();
|
||||||
|
String timeoutTemp = adapterProp.getProperty("HTTP_TIME_OUT");
|
||||||
|
if (StringUtils.isBlank(timeoutTemp)) {
|
||||||
|
timeoutTemp = "30000";
|
||||||
|
}
|
||||||
|
String connectionTimeoutTemp = adapterProp.getProperty("CONNECTION_TIMEOUT");
|
||||||
|
if (StringUtils.isBlank(connectionTimeoutTemp)) {
|
||||||
|
connectionTimeoutTemp = "30000";
|
||||||
|
}
|
||||||
|
|
||||||
|
int timeout = Integer.parseInt(timeoutTemp);
|
||||||
|
int connectionTimeout = Integer.parseInt(connectionTimeoutTemp);
|
||||||
|
long currentTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
String uri = oAuthCredentialVo.getUrl();
|
||||||
|
|
||||||
|
if (!UrlUtils.isAbsoluteUrl(uri)) {
|
||||||
|
uri = appendPath(adapterUrl, uri);
|
||||||
|
}
|
||||||
|
String contentType = "application/json;";
|
||||||
|
|
||||||
|
Charset charset;
|
||||||
|
if (StringUtils.isNotBlank(encode)) {
|
||||||
|
charset = Charset.forName(encode);
|
||||||
|
} else {
|
||||||
|
charset = Charset.defaultCharset();
|
||||||
|
encode = charset.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean useForwardProxy = StringUtils.equalsIgnoreCase(adapterProp.getProperty("FORWARD_PROXY_USE_YN"), "Y");
|
||||||
|
String forwardProxyUrl = adapterProp.getProperty("FORWARD_PROXY_URL");
|
||||||
|
|
||||||
|
logger.debug(
|
||||||
|
"uri:{}, charset:{}, transactionTimeout:{}, connectionTimeout:{}, useForwardProxy:{}, forwardProxyUrl:{}",
|
||||||
|
uri, encode, timeout, connectionTimeout, useForwardProxy, forwardProxyUrl);
|
||||||
|
|
||||||
|
|
||||||
|
// mTLS config with default connection parameters
|
||||||
|
boolean useMtls = StringUtils.equalsIgnoreCase(adapterProp.getProperty(HttpClientAdapterServiceKey.USE_MTLS),
|
||||||
|
"Y");
|
||||||
|
AdapterGroupVO adapterGroup = AdapterManager.getInstance().getAdapterGroup(name);
|
||||||
|
String clientId = adapterGroup.getClientId();
|
||||||
|
|
||||||
|
if (logger.isInfo()) {
|
||||||
|
logger.info("adapterGroupName. : {}, useMtls. : {}, clientId : {}", name, useMtls, clientId);
|
||||||
|
}
|
||||||
|
|
||||||
|
int maxTotalConnections = HttpClientAdapterServiceKey.DEFAULT_MAX_TOTAL_CONNECTIONS;
|
||||||
|
int maxHostConnections = HttpClientAdapterServiceKey.DEFAULT_MAX_CONNECTION_PER_HOST;
|
||||||
|
|
||||||
|
HttpOutTlsInfoVO mtlsInfo = null;
|
||||||
|
SSLContext sslContext = null;
|
||||||
|
PoolingHttpClientConnectionManagerBuilder cmBuilder = PoolingHttpClientConnectionManagerBuilder.create();
|
||||||
|
PoolingHttpClientConnectionManager connectionManager = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (useMtls) {
|
||||||
|
HttpOutTlsInfoManager tlsManager = HttpOutTlsInfoManager.getInstance();
|
||||||
|
if (StringUtils.isNotEmpty(clientId)) {
|
||||||
|
mtlsInfo = tlsManager.getHttpOutTlsInfo(clientId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useMtls && mtlsInfo != null) {
|
||||||
|
String storeType = mtlsInfo.getStoreType();
|
||||||
|
String keyStoreInfo = mtlsInfo.getKeystoreInfo();
|
||||||
|
String keyStorePassword = mtlsInfo.getKeystorePassword();
|
||||||
|
String trustStoreInfo = mtlsInfo.getTruststoreInfo();
|
||||||
|
String trustStorePassword = mtlsInfo.getTruststorePassword();
|
||||||
|
|
||||||
|
String[] tlsVersions = null;
|
||||||
|
String[] cipherSuites = null;
|
||||||
|
|
||||||
|
if (StringUtils.isAnyEmpty(keyStoreInfo, keyStorePassword)) {
|
||||||
|
throw new Exception("mTLS keyStore config error");
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean skipTrust = false;
|
||||||
|
if (StringUtils.isAnyEmpty(trustStoreInfo, trustStorePassword)) {
|
||||||
|
if (logger.isWarn())
|
||||||
|
logger.warn("Skip trustStore validation adapterGroupName : " + name);
|
||||||
|
skipTrust = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
sslContext = HttpClient5SSLContextFactory.createMTLSContextFromContent(storeType, keyStoreInfo,
|
||||||
|
keyStorePassword, trustStoreInfo, trustStorePassword, skipTrust, tlsVersions, cipherSuites);
|
||||||
|
|
||||||
|
SSLConnectionSocketFactory sslSocketFactory = null;
|
||||||
|
if (testMode) {
|
||||||
|
sslSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
|
||||||
|
} else {
|
||||||
|
sslSocketFactory = new SSLConnectionSocketFactory(sslContext);
|
||||||
|
}
|
||||||
|
cmBuilder.setSSLSocketFactory(sslSocketFactory);
|
||||||
|
} else {
|
||||||
|
sslContext = SSLContextBuilder.create().loadTrustMaterial(new TrustAllStrategy()).build();
|
||||||
|
SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
|
||||||
|
cmBuilder.setSSLSocketFactory(csf);
|
||||||
|
}
|
||||||
|
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException
|
||||||
|
| IOException | UnrecoverableKeyException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
connectionManager = cmBuilder.build();
|
||||||
|
connectionManager.setMaxTotal(maxTotalConnections);
|
||||||
|
connectionManager.setDefaultMaxPerRoute(maxHostConnections);
|
||||||
|
|
||||||
|
//json body setting
|
||||||
|
// Map<String,Object> jsonMap = new HashMap<>();
|
||||||
|
// jsonMap.put("scope",oAuthCredentialVo.getScope());
|
||||||
|
// jsonMap.put("grant_type",oAuthCredentialVo.getGrantType());
|
||||||
|
// ObjectMapper objMapper = new ObjectMapper();
|
||||||
|
// String authJsonBody = objMapper.writeValueAsString(jsonMap);
|
||||||
|
|
||||||
|
try (CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connectionManager).build();) {
|
||||||
|
HttpPost httpPost = new HttpPost(uri);
|
||||||
|
// httpPost.setEntity(new StringEntity(authJsonBody));
|
||||||
|
httpPost.setHeader("Content-Type", contentType+" charset=" + encode);
|
||||||
|
|
||||||
|
//HTTP HEADER에 client id, client secret를 base64Encode 한 후 추가
|
||||||
|
// String cId = oAuthCredentialVo.getClientId();
|
||||||
|
// String cSecret = oAuthCredentialVo.getClientSecret();
|
||||||
|
// String authValue = cId + ":" + cSecret;
|
||||||
|
// String encodedAuth = Base64.getEncoder().encodeToString(authValue.getBytes(StandardCharsets.UTF_8));
|
||||||
|
|
||||||
|
String encodedAuth = oAuthCredentialVo.getClientId();
|
||||||
|
httpPost.setHeader("Authorization","Basic "+ encodedAuth);
|
||||||
|
|
||||||
|
|
||||||
|
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();
|
||||||
|
|
||||||
|
if (useForwardProxy) {
|
||||||
|
java.net.URL url = new java.net.URL(forwardProxyUrl);
|
||||||
|
|
||||||
|
// 프로토콜, 호스트, 포트 추출
|
||||||
|
String protocol = url.getProtocol();
|
||||||
|
String host = url.getHost();
|
||||||
|
int port = url.getPort();
|
||||||
|
HttpHost proxy = new HttpHost(protocol, host, port);
|
||||||
|
requestConfigBuilder.setProxy(proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
RequestConfig requestConfig = requestConfigBuilder
|
||||||
|
.setConnectTimeout(Timeout.ofMilliseconds(connectionTimeout))
|
||||||
|
.setResponseTimeout(Timeout.ofMilliseconds(timeout)).build();
|
||||||
|
httpPost.setConfig(requestConfig);
|
||||||
|
|
||||||
|
logger.debug("uri = [" + uri + "]");
|
||||||
|
logger.debug("oauthClientId = [" + oAuthCredentialVo.getClientId() + "]");
|
||||||
|
logger.debug("oauthClientSecret = [" + oAuthCredentialVo.getClientSecret() + "]");
|
||||||
|
logger.debug("oauthScope = [" + oAuthCredentialVo.getScope() + "]");
|
||||||
|
logger.debug("oauthGrantType = [" + oAuthCredentialVo.getGrantType() + "]");
|
||||||
|
logger.debug("oauthauthValue = [" + encodedAuth + "]");
|
||||||
|
logger.debug("contentType = [" + contentType + "]");
|
||||||
|
logger.debug("encode = [" + encode + "]");
|
||||||
|
|
||||||
|
OAuth2AccessTokenVO accessToken = new OAuth2AccessTokenVO();
|
||||||
|
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
||||||
|
if (response.getCode() != 200) {
|
||||||
|
throw new Exception("OAuth token receive status fail value= " + response.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("HttpClientAccessTokenServiceWithBase64Header==>" + response.getCode());
|
||||||
|
|
||||||
|
HttpEntity entity = response.getEntity();
|
||||||
|
String responseString = EntityUtils.toString(entity, encode);
|
||||||
|
logger.debug("Base64Header oauthToken RECV = [" + responseString + "]");
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(responseString)) {
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
JsonNode responseJSON = objectMapper.readTree(responseString);
|
||||||
|
|
||||||
|
if (responseJSON.has("data")) {
|
||||||
|
JsonNode data = responseJSON.path("data");
|
||||||
|
if(data.has("token")) {
|
||||||
|
String token = data.path("token").asText();
|
||||||
|
accessToken.setAccessToken(token);
|
||||||
|
} else {
|
||||||
|
throw new Exception("oauth token return null");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Exception("oauth token return null");
|
||||||
|
}
|
||||||
|
// accessToken.setExpiration(new Date(currentTime + oAuthCredentialVo.getIntervalSec() * 1000L));
|
||||||
|
accessToken.setExpiration(new Date(currentTime + 30_000L));
|
||||||
|
|
||||||
|
logger.debug("oauthToken =" + accessToken.toString());
|
||||||
|
|
||||||
|
return accessToken;
|
||||||
|
} else {
|
||||||
|
throw new Exception("oauth token return null");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error("[HttpClientAccessTokenServiceWithBase64Header] retrieve accessToken exception :" + e.getMessage());
|
||||||
|
return accessToken;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL에 경로를 추가합니다. 중복되는 슬래시를 방지합니다.
|
||||||
|
*
|
||||||
|
* @param baseUrl 기본 URL
|
||||||
|
* @param pathToAdd 추가할 경로
|
||||||
|
* @return 완성된 URL 문자열
|
||||||
|
*/
|
||||||
|
public static String appendPath(String baseUrl, String pathToAdd) {
|
||||||
|
if (!baseUrl.endsWith("/") && !pathToAdd.startsWith("/")) {
|
||||||
|
return baseUrl + "/" + pathToAdd;
|
||||||
|
} else if (baseUrl.endsWith("/") && pathToAdd.startsWith("/")) {
|
||||||
|
return baseUrl + pathToAdd.substring(1);
|
||||||
|
} else {
|
||||||
|
return baseUrl + pathToAdd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
package com.eactive.eai.custom.adapter.http.dynamic.filter;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import com.eactive.eai.adapter.http.dynamic.filter.FilterException;
|
||||||
|
|
||||||
|
class KakaopayFilterTest {
|
||||||
|
|
||||||
|
private KakaopayFilter filter;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void setUp() {
|
||||||
|
filter = new KakaopayFilter();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
// doPreFilter
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_firstAgreedTrue_returnsMessage() throws Exception {
|
||||||
|
String message = "{\"term_agreements\":[{\"is_agreed\":true}]}";
|
||||||
|
|
||||||
|
Object result = filter.doPreFilter(null, null, message, null, null, null);
|
||||||
|
|
||||||
|
assertSame(message, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_firstAgreedFalse_throwsFilterException() throws Exception {
|
||||||
|
String message = "{\"term_agreements\":[{\"is_agreed\":false}]}";
|
||||||
|
|
||||||
|
FilterException ex = assertThrows(FilterException.class,
|
||||||
|
() -> filter.doPreFilter(null, null, message, null, null, null));
|
||||||
|
assertEquals("EB000003", ex.getMessage());
|
||||||
|
assertEquals(200, ex.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_isAgreedFieldMissing_throwsFilterException() {
|
||||||
|
// is_agreed 필드 없음 → getBoolean 기본값 false → 예외
|
||||||
|
String message = "{\"term_agreements\":[{}]}";
|
||||||
|
|
||||||
|
assertThrows(FilterException.class,
|
||||||
|
() -> filter.doPreFilter(null, null, message, null, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_termAgreementsEmpty_throwsFilterException() {
|
||||||
|
// 배열이 비어있어 [0] 접근 불가 → getBoolean 기본값 false → 예외
|
||||||
|
String message = "{\"term_agreements\":[]}";
|
||||||
|
|
||||||
|
assertThrows(FilterException.class,
|
||||||
|
() -> filter.doPreFilter(null, null, message, null, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_termAgreementsMissing_throwsFilterException() {
|
||||||
|
// term_agreements 필드 자체 없음 → getBoolean 기본값 false → 예외
|
||||||
|
String message = "{}";
|
||||||
|
|
||||||
|
assertThrows(FilterException.class,
|
||||||
|
() -> filter.doPreFilter(null, null, message, null, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_multipleEntries_firstAgreedTrue_returnsMessage() throws Exception {
|
||||||
|
// 첫 번째 true, 두 번째 false → 통과
|
||||||
|
String message = "{\"term_agreements\":["
|
||||||
|
+ "{\"is_agreed\":true},"
|
||||||
|
+ "{\"is_agreed\":false}"
|
||||||
|
+ "]}";
|
||||||
|
|
||||||
|
Object result = filter.doPreFilter(null, null, message, null, null, null);
|
||||||
|
|
||||||
|
assertSame(message, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void preFilter_multipleEntries_firstAgreedFalse_throwsFilterException() {
|
||||||
|
// 첫 번째 false, 두 번째 true → 예외
|
||||||
|
String message = "{\"term_agreements\":["
|
||||||
|
+ "{\"is_agreed\":false},"
|
||||||
|
+ "{\"is_agreed\":true}"
|
||||||
|
+ "]}";
|
||||||
|
|
||||||
|
assertThrows(FilterException.class,
|
||||||
|
() -> filter.doPreFilter(null, null, message, null, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
// doPostFilter
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void postFilter_alwaysReturnsResultMessage() throws Exception {
|
||||||
|
String resultMessage = "{\"result\":\"ok\"}";
|
||||||
|
|
||||||
|
Object result = filter.doPostFilter(null, null, resultMessage, null, null, null);
|
||||||
|
|
||||||
|
assertSame(resultMessage, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user