Package ch.tocco.nice2.web.core.api.auth
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
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
ModifierConstructorDescriptionprotected
SecureServlet
(RunEnvironmentService runEnvironmentService, SecureSettings secureSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkSecuredConnection
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) protected void
service
(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, service
Methods 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:
service
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
checkSecuredConnection
protected void checkSecuredConnection(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws SendErrorException, IOException - Throws:
SendErrorException
IOException
-