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 f6f077e100..bf9a80e5ca 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 @@ -36,7 +36,6 @@ import java.util.StringTokenizer; public class WebappAuthenticationValve extends CarbonTomcatValve { private static final Log log = LogFactory.getLog(WebappAuthenticationValve.class); - private static final String BYPASS_URIS = "bypass-uris"; private static HashMap nonSecuredEndpoints = new HashMap<>(); @Override @@ -47,21 +46,6 @@ public class WebappAuthenticationValve extends CarbonTomcatValve { return; } - String byPassURIs = request.getContext().findParameter(WebappAuthenticationValve.BYPASS_URIS); - - if (byPassURIs != null && !byPassURIs.isEmpty()) { - List requestURI = Arrays.asList(byPassURIs.split(",")); - if (requestURI != null && requestURI.size() > 0) { - for (String pathURI : requestURI) { - pathURI = pathURI.replace("\n", "").replace("\r", "").trim(); - if (request.getRequestURI().equals(pathURI)) { - this.getNext().invoke(request, response, compositeValve); - return; - } - } - } - } - WebappAuthenticator authenticator = WebappAuthenticatorFactory.getAuthenticator(request); if (authenticator == null) { String msg = "Failed to load an appropriate authenticator to authenticate the request"; @@ -131,6 +115,7 @@ public class WebappAuthenticationValve extends CarbonTomcatValve { StringTokenizer tokenizer = new StringTokenizer(param, ","); while (tokenizer.hasMoreTokens()) { skippedEndPoint = ctx + tokenizer.nextToken(); + skippedEndPoint = skippedEndPoint.replace("\n", "").replace("\r", "").trim(); if(!skippedEndPoint.endsWith("/")) { skippedEndPoint = skippedEndPoint + "/"; }