java.lang.Object
org.eco.mubisoft.good_and_cheap.application.control.LoginController

@Controller
@RequestMapping("/login")
public class LoginController
extends java.lang.Object

Login Controller

Controller for the login operations. It's duty is to provide the different forms for logging in into the application and logout the user from the application.

  • Constructor Summary

    Constructors
    Constructor Description
    LoginController()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getLoginForm()
    GET LOGIN FORM
    void logout​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    LOGOUT

    Methods inherited from class java.lang.Object

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

    • LoginController

      public LoginController()
  • Method Details

    • getLoginForm

      @GetMapping("/sign-in") public java.lang.String getLoginForm()

      GET LOGIN FORM

      Get the route for the login page through the route "/login/sign-in".

      Returns:
      The route to the login page.
    • logout

      @GetMapping("/logout") public void logout​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException

      LOGOUT

      Remove the user tokens from the session, logging the user out of the application.

      Parameters:
      request - HttpRequest to the server.
      response - HttpResponse from the server.
      Throws:
      java.io.IOException - Response thrown if the server was not able to redirect the user to another page.