Class SecureServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ch.tocco.nice2.web.core.api.auth.SecureServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
- Direct Known Subclasses:
AbstractJsonServlet, AuthenticatedServlet, LoginServlet
public abstract class SecureServlet
extends jakarta.servlet.http.HttpServlet
Servlet that checks if requests come through a secure connection. If true, it delegates to
the
doXXX methods as usual. If not, it sends an HTTP 400 (BAD REQUEST) error.- See Also:
-
Field Summary
FieldsFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSecureServlet(RunEnvironmentService runEnvironmentService, SecureSettings secureSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckSecuredConnection(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) protected voidservice(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
runEnvironmentService
-
-
Constructor Details
-
SecureServlet
-
-
Method Details
-
service
protected void service(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
servicein classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
checkSecuredConnection
protected void checkSecuredConnection(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws SendErrorException, IOException - Throws:
SendErrorExceptionIOException
-