|
|
|
|
@ -20,7 +20,7 @@ import com.ruoyi.framework.manager.factory.AsyncFactory;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录校验方法
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @author ruoyi
|
|
|
|
|
*/
|
|
|
|
|
@Component
|
|
|
|
|
@ -37,7 +37,7 @@ public class SysLoginService
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录验证
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param username 用户名
|
|
|
|
|
* @param password 密码
|
|
|
|
|
* @param code 验证码
|
|
|
|
|
@ -59,6 +59,19 @@ public class SysLoginService
|
|
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
|
|
|
|
throw new CaptchaException();
|
|
|
|
|
}
|
|
|
|
|
// 用户验证
|
|
|
|
|
return login(username, password);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 登录验证
|
|
|
|
|
*
|
|
|
|
|
* @param username 用户名
|
|
|
|
|
* @param password 密码
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
public String login(String username, String password)
|
|
|
|
|
{
|
|
|
|
|
// 用户验证
|
|
|
|
|
Authentication authentication = null;
|
|
|
|
|
try
|
|
|
|
|
|