From dbf95bcc7c41080508f682429d971286f6298f14 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Thu, 3 Sep 2015 20:14:45 +0530 Subject: [PATCH] Fixing an issue in the logic of authentication incoming requests --- .../framework/WebappAuthenticationHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationHandler.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationHandler.java index 9768344832..c700fb304f 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationHandler.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/WebappAuthenticationHandler.java @@ -35,7 +35,7 @@ public class WebappAuthenticationHandler extends CarbonTomcatValve { @Override public void invoke(Request request, Response response, CompositeValve compositeValve) { - if (this.isContextSkipped(request) || (this.isNonAdminService(request) && this.skipAuthentication(request))) { + if (this.isContextSkipped(request) || (!this.isAdminService(request) && this.skipAuthentication(request))) { this.getNext().invoke(request, response, compositeValve); return; } @@ -49,9 +49,9 @@ public class WebappAuthenticationHandler extends CarbonTomcatValve { this.processResponse(request, response, compositeValve, status); } - private boolean isNonAdminService(Request request) { + private boolean isAdminService(Request request) { String param = request.getContext().findParameter("isAdminService"); - return !(param != null && Boolean.parseBoolean(param)); + return (param != null && Boolean.parseBoolean(param)); } private boolean skipAuthentication(Request request) {