Class Logout

All Implemented Interfaces:
spark.Route

public class Logout extends GetRoute
The Logout class handles the GET request for logging out the user.
  • Constructor Details

    • Logout

      public Logout(App app)
      Constructs a Logout route with the specified application.
      Parameters:
      app - the application instance
  • Method Details

    • handleGet

      public Object handleGet(spark.Request request, spark.Response response)
      Handles the GET request for logging out the user. This method invalidates the user's session and redirects them to the home page.
      Specified by:
      handleGet in class GetRoute
      Parameters:
      request - the HTTP request
      response - the HTTP response
      Returns:
      null