Fixing an issue in the logic of authentication incoming requests

revert-70aa11f8
prabathabey 9 years ago
parent 46c5f2534f
commit dbf95bcc7c

@ -35,7 +35,7 @@ public class WebappAuthenticationHandler extends CarbonTomcatValve {
@Override @Override
public void invoke(Request request, Response response, CompositeValve compositeValve) { 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); this.getNext().invoke(request, response, compositeValve);
return; return;
} }
@ -49,9 +49,9 @@ public class WebappAuthenticationHandler extends CarbonTomcatValve {
this.processResponse(request, response, compositeValve, status); this.processResponse(request, response, compositeValve, status);
} }
private boolean isNonAdminService(Request request) { private boolean isAdminService(Request request) {
String param = request.getContext().findParameter("isAdminService"); String param = request.getContext().findParameter("isAdminService");
return !(param != null && Boolean.parseBoolean(param)); return (param != null && Boolean.parseBoolean(param));
} }
private boolean skipAuthentication(Request request) { private boolean skipAuthentication(Request request) {

Loading…
Cancel
Save