Class BasicAuthServlet

All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Direct Known Subclasses:
DownloadServlet, UploadServlet, WebServiceServlet

abstract class BasicAuthServlet extends GenericServlet
A servlet that supports basic HTTP authentication.
Since:
1.0
Version:
11.3
Author:
Luke
  • Constructor Details

    • BasicAuthServlet

      BasicAuthServlet()
  • Method Details

    • authenticate

      protected static Pilot authenticate(HttpServletRequest req)
      Authenticates the current web user.
      Parameters:
      req - the current HTTP servlet request
      Returns:
      the authenticated Pilot's databse record, or null if not logged in
    • challenge

      protected static void challenge(HttpServletResponse rsp, String realm) throws IOException
      Sets the response headers for a basic authentication challenge.
      Parameters:
      rsp - the HTTP servlet response
      realm - the realm name to present to the browser
      Throws:
      IOException - if a network error occurs