|
@@ -93,19 +93,19 @@ public class SysLoginService
|
|
|
*/
|
|
|
public String login(String username, String password, String code, String uuid,String smsCode,String tel)
|
|
|
{
|
|
|
-// String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
|
|
-// String captcha = redisCache.getCacheObject(verifyKey);
|
|
|
-// redisCache.deleteObject(verifyKey);
|
|
|
-// if (captcha == null)
|
|
|
-// {
|
|
|
-// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
|
|
-// throw new CaptchaExpireException();
|
|
|
-// }
|
|
|
-// if (!code.equalsIgnoreCase(captcha))
|
|
|
-// {
|
|
|
-// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
|
|
-// throw new CaptchaException();
|
|
|
-// }
|
|
|
+ String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
|
|
+ String captcha = redisCache.getCacheObject(verifyKey);
|
|
|
+ redisCache.deleteObject(verifyKey);
|
|
|
+ if (captcha == null)
|
|
|
+ {
|
|
|
+ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
|
|
+ throw new CaptchaExpireException();
|
|
|
+ }
|
|
|
+ if (!code.equalsIgnoreCase(captcha))
|
|
|
+ {
|
|
|
+ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
|
|
+ throw new CaptchaException();
|
|
|
+ }
|
|
|
// iUserLoginErrorService.checkLimit(username);
|
|
|
// 用户验证
|
|
|
Authentication authentication = null;
|