Package com.illumon.util.jettyhelper
Class LambdaServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.illumon.util.jettyhelper.LambdaServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class LambdaServlet
extends javax.servlet.http.HttpServlet
Class to provide servlet capabilities for Jetty servers, including authentication if required
When requested, authentication is performed through both the authentication server and the Iris group provider.
The user will be authenticated through the Iris auth server by username/password, and be a member of the appropriate group.
Two groups are allowed,
iris-webviewers
and mainClassName.iris-webviewers
, where
mainClassName
is passed in at construction time (it usually corresponds to the class providing web
services, such as RemoteQueryDispatcher or DataImportServer). If the user is a member of either group, they can access
the provided services.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description LambdaServlet(com.fishlib.io.logger.Logger log, Supplier<String> lambda, String mainClassName, boolean authenticationRequired, IrisGroupProvider irisGroupProvider, JettyServerHelper jettyServerHelper, String lambdaName)
Constructor -
Method Summary
Modifier and Type Method Description protected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
Constructor Details
-
LambdaServlet
public LambdaServlet(com.fishlib.io.logger.Logger log, Supplier<String> lambda, String mainClassName, boolean authenticationRequired, IrisGroupProvider irisGroupProvider, JettyServerHelper jettyServerHelper, String lambdaName)Constructor- Parameters:
log
- the Logger instancelambda
- the action to performmainClassName
- the main class name, used for group validationauthenticationRequired
- if true, then authentication is required to perform any actionsirisGroupProvider
- the IrisGroupProvider if authentication is required
-
-
Method Details
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
IOException
-