From 485179e16feaca061c879f318b76b12929ef95ad Mon Sep 17 00:00:00 2001 From: charitha Date: Thu, 18 Jun 2020 11:06:59 +0530 Subject: [PATCH] Add IoT-Node-IP response header --- .../authenticator/framework/WebappAuthenticationValve.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java index b987c14311..897bba0812 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationValve.java @@ -40,7 +40,6 @@ import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration; -import java.util.HashMap; import java.util.StringTokenizer; import java.util.TreeMap; import java.util.regex.Pattern; @@ -48,10 +47,12 @@ import java.util.regex.Pattern; public class WebappAuthenticationValve extends CarbonTomcatValve { private static final Log log = LogFactory.getLog(WebappAuthenticationValve.class); - private static TreeMap nonSecuredEndpoints = new TreeMap<>(); + private static final TreeMap nonSecuredEndpoints = new TreeMap<>(); private static final String PERMISSION_PREFIX = "/permission/admin"; public static final String AUTHORIZE_PERMISSION = "Authorize-Permission"; + private static InetAddress inetAddress = null; + @Override public void invoke(Request request, Response response, CompositeValve compositeValve) { if (response != null) {