| Line 77... |
Line 77... |
| 77 |
cookieEmailId.setDomain(request.getServerName());
|
77 |
cookieEmailId.setDomain(request.getServerName());
|
| 78 |
cookieEmailId.setPath(properties.getProperty("app.context.path"));
|
78 |
cookieEmailId.setPath(properties.getProperty("app.context.path"));
|
| 79 |
response.addCookie(cookieFofoId);
|
79 |
response.addCookie(cookieFofoId);
|
| 80 |
response.addCookie(cookieEmailId);
|
80 |
response.addCookie(cookieEmailId);
|
| 81 |
LOGGER.info("Requested token email_id is valid, user login to system, shoud be redirect to /dashboard");
|
81 |
LOGGER.info("Requested token email_id is valid, user login to system, shoud be redirect to /dashboard");
|
| 82 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_OK_1002", true, "/profitmandi-fofo/dashboard"));
|
82 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_OK_1002", true, request.getContextPath() + "/dashboard"));
|
| 83 |
return "response";
|
83 |
return "response";
|
| 84 |
// return mvcResponseSender.createResponseString("RTLR_OK_1002", true, "/profitmandi-fofo/dashboard");
|
84 |
// return mvcResponseSender.createResponseString("RTLR_OK_1002", true, "/profitmandi-fofo/dashboard");
|
| 85 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
85 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
| 86 |
LOGGER.error("Error : ", profitMandiBusinessException);
|
86 |
LOGGER.error("Error : ", profitMandiBusinessException);
|
| 87 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString(profitMandiBusinessException.getCode(), false, "/error"));
|
87 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString(profitMandiBusinessException.getCode(), false, "/error"));
|
| Line 92... |
Line 92... |
| 92 |
@RequestMapping(value = "/logout", method = RequestMethod.GET)
|
92 |
@RequestMapping(value = "/logout", method = RequestMethod.GET)
|
| 93 |
public String logout(HttpServletRequest request, @ModelAttribute("model") ModelMap model, HttpServletResponse response) throws Exception{
|
93 |
public String logout(HttpServletRequest request, @ModelAttribute("model") ModelMap model, HttpServletResponse response) throws Exception{
|
| 94 |
try{
|
94 |
try{
|
| 95 |
cookiesProcessor.removeCookies(request, response);
|
95 |
cookiesProcessor.removeCookies(request, response);
|
| 96 |
LOGGER.info("Logout is successfull, should be redirect to /login");
|
96 |
LOGGER.info("Logout is successfull, should be redirect to /login");
|
| 97 |
return "login";
|
97 |
return "redirect:/login";
|
| 98 |
}catch(Exception | ProfitMandiBusinessException profitMandiBusinessException){
|
98 |
}catch(Exception | ProfitMandiBusinessException profitMandiBusinessException){
|
| 99 |
LOGGER.info("Error occured while removing requested cookies, should be redirect to /login");
|
99 |
LOGGER.info("Error occured while removing requested cookies, should be redirect to /login");
|
| 100 |
return "login";
|
100 |
return "redirect:/login";
|
| 101 |
}
|
101 |
}
|
| 102 |
}
|
102 |
}
|
| 103 |
|
103 |
|
| 104 |
|
104 |
|
| 105 |
|
105 |
|