Class LogOut
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
me.nickhanson.codeforge.controller.LogOut
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable,PropertiesLoader
@WebServlet("/logout")
public class LogOut
extends jakarta.servlet.http.HttpServlet
implements PropertiesLoader
Handles user logout by invalidating the local session and redirecting to Cognito logout.
Sends the user to the Cognito logout endpoint, which then redirects back to the application.
- Author:
- Nick Hanson
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Methods 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, logMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.nickhanson.codeforge.config.PropertiesLoader
loadProperties
-
Constructor Details
-
LogOut
public LogOut()
-
-
Method Details
-
init
public void init()- Overrides:
initin classjakarta.servlet.GenericServlet
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException Handles logout by invalidating the local session and redirecting to Cognito logout.- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HTTP requestresp- the HTTP response- Throws:
IOException- if an input or output error occurs
-