|
@@ -145,16 +145,16 @@ module.exports = app => {
|
|
cooperation = accountData.cooperation;
|
|
cooperation = accountData.cooperation;
|
|
|
|
|
|
// 判断密码
|
|
// 判断密码
|
|
- if (accountData.is_admin === 1) {
|
|
|
|
- // 管理员则用sso通道判断
|
|
|
|
- const sso = new SSO(this.ctx);
|
|
|
|
- result = await sso.loginValid(data.account, data.project_password.toString());
|
|
|
|
- } else {
|
|
|
|
- // 加密密码
|
|
|
|
- const encryptPassword = crypto.createHmac('sha1', data.account).update(data.project_password)
|
|
|
|
- .digest().toString('base64');
|
|
|
|
- result = encryptPassword === accountData.password;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (accountData.is_admin === 1) {
|
|
|
|
+ // // 管理员则用sso通道判断
|
|
|
|
+ // const sso = new SSO(this.ctx);
|
|
|
|
+ // result = await sso.loginValid(data.account, data.project_password.toString());
|
|
|
|
+ // } else {
|
|
|
|
+ // 加密密码
|
|
|
|
+ const encryptPassword = crypto.createHmac('sha1', data.account).update(data.project_password)
|
|
|
|
+ .digest().toString('base64');
|
|
|
|
+ result = encryptPassword === accountData.password;
|
|
|
|
+ // }
|
|
} else {
|
|
} else {
|
|
// sso登录(演示版)
|
|
// sso登录(演示版)
|
|
const sso = new SSO(this.ctx);
|
|
const sso = new SSO(this.ctx);
|