Class KeycloakUserServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
io.hawt.web.auth.UserServlet
io.hawt.web.auth.keycloak.KeycloakUserServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class KeycloakUserServlet extends UserServlet
See Also:
  • Field Summary

    Fields inherited from class io.hawt.web.auth.UserServlet

    config

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    getKeycloakUsername(jakarta.servlet.http.HttpServletRequest req)
    With Keycloak integration, the Authorization header is available in the request to the UserServlet.
    protected String
    getUsername(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
     
    void
     

    Methods inherited from class io.hawt.web.auth.UserServlet

    doGet

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log

    Methods inherited from class java.lang.Object

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

    • KeycloakUserServlet

      public KeycloakUserServlet()
  • Method Details

    • init

      public void init() throws jakarta.servlet.ServletException
      Overrides:
      init in class UserServlet
      Throws:
      jakarta.servlet.ServletException
    • getUsername

      protected String getUsername(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
      Overrides:
      getUsername in class UserServlet
    • getKeycloakUsername

      protected String getKeycloakUsername(jakarta.servlet.http.HttpServletRequest req)
      With Keycloak integration, the Authorization header is available in the request to the UserServlet.