water.webserver.iface.RequestAuthExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of h2o-webserver-iface Show documentation
Show all versions of h2o-webserver-iface Show documentation
Interface module isolating H2O functionality from specific HTTP server implementation. Exposes facade that needs to have exactly one implementation on runtime classpath.
The newest version!
package water.webserver.iface;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Extension point for HTTP request handling. Managed by ExtensionManager.
*/
public interface RequestAuthExtension {
/**
* Extended handler for customizing HTTP request authentication.
*
* @param target -
* @param request -
* @param response -
* @return true if the request should be considered handled, false otherwise
* @throws IOException -
* @throws ServletException -
*/
boolean handle(String target, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException;
/**
* @return True if the given extension is enabled. Otherwise false.
*/
default boolean isEnabled(){
return true;
}
/**
* @return name of extension. By default, returns (simple) class name.
*/
default String getName() {
return getClass().getSimpleName();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy