Class KeycloakUserServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class KeycloakUserServlet
    extends UserServlet
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getKeycloakUsername​(javax.servlet.http.HttpServletRequest req)
      With Keycloak integration, the Authorization header is available in the request to the UserServlet.
      protected java.lang.String getUsername​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      void init()  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.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
    • Constructor Detail

      • KeycloakUserServlet

        public KeycloakUserServlet()
    • Method Detail

      • init

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

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

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