|
|
|
@ -41,7 +41,7 @@ public class WebappAuthenticationValve extends CarbonTomcatValve {
|
|
|
|
|
@Override
|
|
|
|
|
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);
|
|
|
|
|
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) {
|
|
|
|
|
String param = request.getContext().findParameter("doAuthentication");
|
|
|
|
|
return (param == null || !Boolean.parseBoolean(param) || isNonSecuredEndPoint(request));
|
|
|
|
|