package org.eclipse.che.keycloak.server;

import javax.servlet.Filter;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;

public abstract class AbstractKeycloakFilter implements Filter {

  protected boolean shouldSkipAuthentication(HttpServletRequest request, String token) {
    return request.getScheme().startsWith("ws") || (token != null && token.startsWith("machine"));
  }

  @Override
  public void init(FilterConfig filterConfig) throws ServletException {}

  @Override
  public void destroy() {}
}

@@ -185,16 +185,206 @@
 quest;%0A%0A
+/**%0A * Base abstract class for the Keycloak-related servlet filters.%0A * %0A * In particular it defines commnon use-cases when the%0A * authentication / multi-user logic should be skipped%0A *%0A */%0A
 public a

Add Javadoc