-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathSignInRouteController.java
More file actions
32 lines (25 loc) · 1.08 KB
/
SignInRouteController.java
File metadata and controls
32 lines (25 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package edu.uark.registerapp.controllers;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import edu.uark.registerapp.controllers.enums.ViewNames;
@Controller
@RequestMapping(value = "/")
public class SignInRouteController extends BaseRouteController {
// TODO: Route for initial page load
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public ModelAndView performSignIn(
// TODO: Define an object that will represent the sign in request and add it as a parameter here
HttpServletRequest request
) {
// TODO: Use the credentials provided in the request body
// and the "id" property of the (HttpServletRequest)request.getSession() variable
// to sign in the user
return new ModelAndView(
REDIRECT_PREPEND.concat(
ViewNames.MAIN_MENU.getRoute()));
}
}