| | |
| | | String userName = (String) authenticationToken.getPrincipal(); |
| | | UserInf user = userBridgeService.findPasswordByUserName(userName); |
| | | if(user.getUId()==0){ |
| | | throw new UnknownAccountException(MessageUtils.getMessage("AccountNotExist")); |
| | | throw new UnknownAccountException(MessageUtils.getMessage("AccountOrPasswordError")); |
| | | } |
| | | String password = RSAUtil.decrypt(user.getUpassword(),RSAUtil.getPrivateKey()); |
| | | return new SimpleAuthenticationInfo(user,password,getName()); |
| | |
| | | |
| | | //查询账号状态 |
| | | if(userInf == null){ |
| | | return response.set(1,false,MessageUtils.getMessage("AccountNotExist")); |
| | | return response.set(1,false,MessageUtils.getMessage("AccountOrPasswordError")); |
| | | } |
| | | if (userInf.getStatus() != 1) { |
| | | switch (userInf.getStatus()) { |
| | |
| | | servletContext.setAttribute(userName + "_login_fail_times_" + System.currentTimeMillis(), 0); |
| | | } |
| | | CommonUtil.record(0, UserOperation.TYPE_LOGIN_FAIL.getType(), UserOperation.TYPE_LOGIN_FAIL.getTypeName(), UserOperation.TYPE_LOGIN_FAIL.getTypeNameEn()); |
| | | return response.set(1, false, MessageUtils.getMessage("PasswordError")); |
| | | return response.set(1, false, MessageUtils.getMessage("AccountOrPasswordError")); |
| | | } |
| | | return response.set(1, false, message); |
| | | } |
| | |
| | | |
| | | //查询账号状态 |
| | | if(userInf == null){ |
| | | return response.set(1,false,MessageUtils.getMessage("AccountNotExist")); |
| | | return response.set(1,false,MessageUtils.getMessage("AccountOrPasswordError")); |
| | | } |
| | | if (userInf.getStatus() != 1) { |
| | | switch (userInf.getStatus()) { |
| | |
| | | LoginSucceeded=Login succeeded |
| | | AuthenticationFailed=authentication failed |
| | | AccountNotExist=Account does not exist |
| | | AccountOrPasswordError=Account or password is incorrect |
| | | userNoPermitGroup=The current user does not have a corresponding permission group, login failed |
| | | test_type0=NONE |
| | | test_type1=Floating charge |
| | |
| | | LoginSucceeded=登录成功 |
| | | AuthenticationFailed=认证未通过 |
| | | AccountNotExist=账号不存在 |
| | | AccountOrPasswordError=账号或密码错误 |
| | | userNoPermitGroup=当前用户没有对应的权限组,登录失败 |
| | | test_type0=无 |
| | | test_type1=浮充 |