| Line 120... |
Line 120... |
| 120 |
LOGGER.error("Data Inconsistent", pmbe);
|
120 |
LOGGER.error("Data Inconsistent", pmbe);
|
| 121 |
}
|
121 |
}
|
| 122 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
122 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
| 123 |
LOGGER.error("User not found with given emailId", profitMandiBusinessException);
|
123 |
LOGGER.error("User not found with given emailId", profitMandiBusinessException);
|
| 124 |
}
|
124 |
}
|
| 125 |
this.addCookiesToResponse(fofoDetails, request, response);
|
- |
|
| 126 |
String redirectUrl = Utils.getRedictUrlFromLogin(fofoDetails);
|
125 |
String redirectUrl = Utils.getRedictUrlFromLogin(fofoDetails);
|
| - |
|
126 |
if(!redirectUrl.equals("/login")){
|
| - |
|
127 |
this.addCookiesToResponse(fofoDetails, request, response);
|
| 127 |
LOGGER.info("Requested token email_id is valid, user login to system, shoud be redirect to {}", redirectUrl);
|
128 |
LOGGER.info("Requested token email_id is valid, user login to system, shoud be redirect to {}", redirectUrl);
|
| - |
|
129 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_OK_1002", true, request.getContextPath() + redirectUrl));
|
| 128 |
|
130 |
}else{
|
| - |
|
131 |
LOGGER.error("Requested token email_id is not valid, please try to login");
|
| 129 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString("RTLR_OK_1002", true, request.getContextPath() + redirectUrl));
|
132 |
throw new ProfitMandiBusinessException(ProfitMandiConstants.EMAIL_ID, fofoDetails.getEmailId(), "RTLR_1000");
|
| - |
|
133 |
}
|
| 130 |
return "response";
|
134 |
return "response";
|
| 131 |
} catch(ProfitMandiBusinessException profitMandiBusinessException){
|
135 |
} catch(ProfitMandiBusinessException profitMandiBusinessException){
|
| 132 |
LOGGER.error("Error : ", profitMandiBusinessException);
|
136 |
LOGGER.error("Error : ", profitMandiBusinessException);
|
| 133 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString(profitMandiBusinessException.getCode(), false, "/error"));
|
137 |
model.addAttribute("loginResponse", mvcResponseSender.createResponseString(profitMandiBusinessException.getCode(), false, "/error"));
|
| 134 |
return "response";
|
138 |
return "response";
|