|
|
@@ -88,20 +88,20 @@ public class AdminAuthController {
|
|
|
public Object login(@RequestBody String body, HttpServletRequest request) {
|
|
|
String username = JacksonUtil.parseString(body, "username");
|
|
|
String password = JacksonUtil.parseString(body, "password");
|
|
|
- String code = JacksonUtil.parseString(body, "code");
|
|
|
+// String code = JacksonUtil.parseString(body, "code");
|
|
|
|
|
|
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
|
|
|
return ResponseUtil.badArgument();
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(code)) {
|
|
|
- return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA_REQUIRED, "验证码不能空");
|
|
|
- }
|
|
|
-
|
|
|
- HttpSession session = request.getSession();
|
|
|
- String kaptcha = (String)session.getAttribute("kaptcha");
|
|
|
- if (Objects.requireNonNull(code).compareToIgnoreCase(kaptcha) != 0) {
|
|
|
- return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA, "验证码不正确", doKaptcha(request));
|
|
|
- }
|
|
|
+// if (StringUtils.isEmpty(code)) {
|
|
|
+// return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA_REQUIRED, "验证码不能空");
|
|
|
+// }
|
|
|
+
|
|
|
+// HttpSession session = request.getSession();
|
|
|
+// String kaptcha = (String)session.getAttribute("kaptcha");
|
|
|
+// if (Objects.requireNonNull(code).compareToIgnoreCase(kaptcha) != 0) {
|
|
|
+// return ResponseUtil.fail(ADMIN_INVALID_KAPTCHA, "验证码不正确", doKaptcha(request));
|
|
|
+// }
|
|
|
|
|
|
Subject currentUser = SecurityUtils.getSubject();
|
|
|
try {
|