From 62fe307b52164d3afbfb02538ae574b368aa6a6c Mon Sep 17 00:00:00 2001 From: kameshsr Date: Tue, 1 Oct 2024 16:34:51 +0530 Subject: [PATCH] MOSIP-35176 Revert debugging changes Signed-off-by: kameshsr --- .../websub/api/config/IntentVerificationConfig.java | 8 -------- .../websub/api/filter/IntentVerificationFilter.java | 9 +-------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java index e219ef92c3..a1c6e40b1c 100644 --- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java +++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java @@ -42,7 +42,6 @@ public void setEmbeddedValueResolver(StringValueResolver resolver) { @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - logger.info("inside setApplicationContext"); mappings = new HashMap<>(); for (String beanName : applicationContext.getBeanDefinitionNames()) { //Skip processing this intentVerificationConfig bean. @@ -52,25 +51,20 @@ public void setApplicationContext(ApplicationContext applicationContext) throws if (!((ConfigurableApplicationContext) applicationContext).getBeanFactory().getBeanDefinition(beanName) .isLazyInit()) { Object obj = applicationContext.getBean(beanName); - logger.info("bean-"+ beanName); Class objClazz = obj.getClass(); - logger.info("objClazz"+ objClazz); if (AopUtils.isAopProxy(obj)) { objClazz = AopUtils.getTargetClass(obj); } for (Method method : objClazz.getDeclaredMethods()) { - logger.info("method name-"+method); if (method.isAnnotationPresent(PreAuthenticateContentAndVerifyIntent.class)) { PreAuthenticateContentAndVerifyIntent preAuthenticateContent = method .getAnnotation(PreAuthenticateContentAndVerifyIntent.class); String topic = preAuthenticateContent.topic(); - logger.info("topic- "+topic); String callback = preAuthenticateContent.callback(); - logger.info("callback- "+callback); if (topic.startsWith("${") && topic.endsWith("}")) { topic = resolver.resolveStringValue(topic); } @@ -79,13 +73,11 @@ public void setApplicationContext(ApplicationContext applicationContext) throws callback = resolver.resolveStringValue(callback); } mappings.put(callback, topic); - logger.info("mapping"+ mappings); } } IntentVerificationFilter intentVerificationFilter = applicationContext .getBean(IntentVerificationFilter.class); intentVerificationFilter.setMappings(mappings); - logger.info("mapping after setting value-"+mappings); } } } diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java index 9dc7bb79ff..b9d8f42fa1 100644 --- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java +++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java @@ -41,17 +41,12 @@ public class IntentVerificationFilter extends OncePerRequestFilter { private Map mappings = null; public IntentVerificationFilter(IntentVerifier intentVerifier) { - logger.info("inside intentVerification filter intentverifier"); - logger.info("intentVerifier"+ intentVerifier); this.intentVerifier = intentVerifier; } @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { - logger.info("inside doFilterInternal"); - logger.info("HttpServletRequest request- "+request); - if(!request.getRequestURI().contains("health")) { String topic = matchCallbackURL(request.getRequestURI()); if (request.getMethod().equals(HttpMethod.GET.name()) && topic != null) { String topicReq = request.getParameter(WebSubClientConstants.HUB_TOPIC); @@ -94,11 +89,9 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse filterChain.doFilter(request, response); } } - } + private String matchCallbackURL(String requestURI) { - logger.info("mappings"+ mappings); - logger.info("requestURI-"+requestURI); if(mappings.containsKey(requestURI)) { return mappings.get(requestURI); }else {