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
    Modifier and Type
    Field
    Description
    protected final RunEnvironmentService
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SecureServlet(RunEnvironmentService runEnvironmentService, SecureSettings secureSettings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • service

      protected void service(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Overrides:
      service in class jakarta.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