| | |
| | | import javax.annotation.Resource; |
| | | import javax.jws.soap.SOAPBinding; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.awt.image.BufferedImage; |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | // // todo 短信验证码 |
| | | // @ResponseBody |
| | | // @PostMapping("/getSMSCode") |
| | | // public String getSMSCode( String phone) { |
| | |
| | | if (password.equals("38B8/EBdihRzcFNtJYSH+g==")){ |
| | | return "/password.html"; |
| | | } |
| | | |
| | | //验证验证码是否正确 |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
| | | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | | if (ToolUtil.isEmpty(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { |
| | | throw new InvalidKaptchaException(); |
| | | } |
| | | |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | String s = MD5.md5(password); |
| | |
| | | return "/login.html"; |
| | | } |
| | | |
| | | |
| | | GetTokenRequest tokenRequest = new GetTokenRequest(); |
| | | tokenRequest.setUsername(username); |
| | | tokenRequest.setPassword(password); |
| | |
| | | super.getSession().setAttribute("language",language); |
| | | return REDIRECT + "/"; |
| | | } |
| | | |
| | | /** |
| | | * 退出登录 |
| | | */ |
| | |
| | | deleteAllCookie(); |
| | | return REDIRECT + "/login"; |
| | | } |
| | | |
| | | } |