|
|
@ -41,7 +41,7 @@ public class WebappAuthenticationValve 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.isAdminService(request) && this.skipAuthentication(request))) {
|
|
|
|
if (this.isContextSkipped(request) || this.skipAuthentication(request)) {
|
|
|
|
this.getNext().invoke(request, response, compositeValve);
|
|
|
|
this.getNext().invoke(request, response, compositeValve);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -74,11 +74,6 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isAdminService(Request request) {
|
|
|
|
|
|
|
|
String param = request.getContext().findParameter("isAdminService");
|
|
|
|
|
|
|
|
return (param != null && Boolean.parseBoolean(param));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean skipAuthentication(Request request) {
|
|
|
|
private boolean skipAuthentication(Request request) {
|
|
|
|
String param = request.getContext().findParameter("doAuthentication");
|
|
|
|
String param = request.getContext().findParameter("doAuthentication");
|
|
|
|
return (param == null || !Boolean.parseBoolean(param) || isNonSecuredEndPoint(request));
|
|
|
|
return (param == null || !Boolean.parseBoolean(param) || isNonSecuredEndPoint(request));
|
|
|
|