Compare commits
2 Commits
a218291748
...
46d88d77f2
| Author | SHA1 | Date | |
|---|---|---|---|
| 46d88d77f2 | |||
| 51967284ba |
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilter;
|
import com.eactive.eai.adapter.http.dynamic.filter.HttpAdapterFilter;
|
||||||
import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException;
|
import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException;
|
||||||
@@ -48,7 +49,7 @@ public class ApiKeyExtractFilter implements HttpAdapterFilter {
|
|||||||
// PathVariable 지원 추가
|
// PathVariable 지원 추가
|
||||||
String ruledPath = getMatchedKey(requestPath);
|
String ruledPath = getMatchedKey(requestPath);
|
||||||
if(ruledPath == null)
|
if(ruledPath == null)
|
||||||
throw new IllegalAccessException("path not found - " + requestPath);
|
throw new FilterException("path not found - " + requestPath, ERROR_PRE_FAIL, HttpStatus.FORBIDDEN.value());
|
||||||
prop.setProperty(FINAL_STD_MESSAGE_KEY, ruledPath);// StandardMessageUtil.getMatchedKey(), url
|
prop.setProperty(FINAL_STD_MESSAGE_KEY, ruledPath);// StandardMessageUtil.getMatchedKey(), url
|
||||||
// pathvariable도 처리
|
// pathvariable도 처리
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
|
|
||||||
public interface HttpAdapterFilter {
|
public interface HttpAdapterFilter {
|
||||||
|
|
||||||
|
public static final String ERROR_PRE_FAIL = "E.PREFILTER_FAIL";
|
||||||
|
public static final String ERROR_POST_FAIL = "E.POSTFILTER_FAIL";
|
||||||
|
|
||||||
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception;
|
HttpServletRequest request, HttpServletResponse response) throws Exception;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user