Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-35176 Added debug log #1576

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class SubscriberClientImpl
public SubscriptionChangeResponse subscribe(SubscriptionChangeRequest subscriptionRequest) {
// TODO code duplicacy remove
// TODO retries on redirect
LOGGER.info("i am subscribe method");
verifySubscribeModel(subscriptionRequest);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import jakarta.servlet.Filter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -32,6 +34,8 @@
@EnableAspectJAutoProxy
public class WebSubClientConfig {

private static final Logger logger = LoggerFactory.getLogger(WebSubClientConfig.class);

@Bean
public IntentVerifier intentVerifier() {
return new IntentVerifier();
Expand All @@ -51,6 +55,7 @@ public FilterRegistrationBean<Filter> registerIntentVerificationFilterFilterBean

@Bean
public IntentVerificationFilter registerIntentVerificationFilter(IntentVerifier intentVerifier) {
logger.info("inside intentVerification filter");
return new IntentVerificationFilter(intentVerifier);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ public class IntentVerificationFilter extends OncePerRequestFilter {
private Map<String, String> 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.debug("inside doFilterInternal");
logger.debug("HttpServletRequest request- "+request);
logger.info("inside doFilterInternal");
logger.info("HttpServletRequest request- "+request);
String topic=matchCallbackURL(request.getRequestURI());
if (request.getMethod().equals(HttpMethod.GET.name()) && topic!=null) {
String topicReq = request.getParameter(WebSubClientConstants.HUB_TOPIC);
Expand Down Expand Up @@ -93,6 +95,8 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
}

private String matchCallbackURL(String requestURI) {
logger.info("mappings"+ mappings);
logger.info("requestURI-"+requestURI);
if(mappings.containsKey(requestURI)) {
return mappings.get(requestURI);
}else {
Expand Down
Loading