密码加密传递暂时注释掉
This commit is contained in:
@@ -227,17 +227,9 @@
|
|||||||
created () {
|
created () {
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
this.getRouterData();
|
this.getRouterData();
|
||||||
this.getEncrypte();
|
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
|
||||||
// update-begin- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能
|
//this.getEncrypte();
|
||||||
// this.$http.get('/auth/2step-code')
|
// update-end- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
|
||||||
// .then(res => {
|
|
||||||
// this.requiredTwoStepCaptcha = res.result.stepCode
|
|
||||||
// }).catch(err => {
|
|
||||||
// console.log('2step-code:', err)
|
|
||||||
// })
|
|
||||||
// update-end- --- author:scott ------ date:20190225 ---- for:暂时注释,未实现登录验证码功能
|
|
||||||
// this.requiredTwoStepCaptcha = true
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions([ "Login", "Logout","PhoneLogin" ]),
|
...mapActions([ "Login", "Logout","PhoneLogin" ]),
|
||||||
@@ -266,8 +258,12 @@
|
|||||||
that.form.validateFields([ 'username', 'password','inputCode' ], { force: true }, (err, values) => {
|
that.form.validateFields([ 'username', 'password','inputCode' ], { force: true }, (err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
loginParams.username = values.username
|
loginParams.username = values.username
|
||||||
|
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
|
||||||
//loginParams.password = md5(values.password)
|
//loginParams.password = md5(values.password)
|
||||||
loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv).replace(/\+/g,"%2B");
|
//loginParams.password = encryption(values.password,that.encryptedString.key,that.encryptedString.iv)
|
||||||
|
loginParams.password = values.password
|
||||||
|
// update-begin- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
|
||||||
|
|
||||||
that.Login(loginParams).then((res) => {
|
that.Login(loginParams).then((res) => {
|
||||||
this.departConfirm(res)
|
this.departConfirm(res)
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
|||||||
+6
-3
@@ -67,8 +67,11 @@ public class LoginController {
|
|||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String username = sysLoginModel.getUsername();
|
String username = sysLoginModel.getUsername();
|
||||||
String password = sysLoginModel.getPassword();
|
String password = sysLoginModel.getPassword();
|
||||||
//步骤1:TODO 前端密码加密,后端进行密码解密,防止传输密码篡改等问题,不配就直接提示密码错误,并记录日志后期进行统计分析是否锁定
|
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
|
||||||
password = AesEncryptUtil.desEncrypt(sysLoginModel.getPassword().replaceAll("%2B", "\\+")).trim();//密码解密
|
//前端密码加密,后端进行密码解密
|
||||||
|
//password = AesEncryptUtil.desEncrypt(sysLoginModel.getPassword().replaceAll("%2B", "\\+")).trim();//密码解密
|
||||||
|
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
|
||||||
|
|
||||||
//1. 校验用户是否有效
|
//1. 校验用户是否有效
|
||||||
SysUser sysUser = sysUserService.getUserByName(username);
|
SysUser sysUser = sysUserService.getUserByName(username);
|
||||||
result = sysUserService.checkUserIsEffective(sysUser);
|
result = sysUserService.checkUserIsEffective(sysUser);
|
||||||
@@ -263,7 +266,7 @@ public class LoginController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/phoneLogin")
|
@PostMapping("/phoneLogin")
|
||||||
public Result<JSONObject> login(@RequestBody JSONObject jsonObject) {
|
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) {
|
||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String phone = jsonObject.getString("mobile");
|
String phone = jsonObject.getString("mobile");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user