Package io.hawt.web.auth.keycloak
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
- See Also:
-
Field Summary
Fields inherited from class io.hawt.web.auth.UserServlet
configFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetKeycloakUsername(jakarta.servlet.http.HttpServletRequest req) With Keycloak integration, the Authorization header is available in the request to the UserServlet.protected StringgetUsername(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) voidinit()Methods inherited from class io.hawt.web.auth.UserServlet
doGetMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
KeycloakUserServlet
public KeycloakUserServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classUserServlet- Throws:
jakarta.servlet.ServletException
-
getUsername
protected String getUsername(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) - Overrides:
getUsernamein classUserServlet
-
getKeycloakUsername
With Keycloak integration, the Authorization header is available in the request to the UserServlet.
-