提交 0faf9c08 编写于 作者: Cano1997's avatar Cano1997

update: 修改密码、忘记密码改为rsa加密

上级 c871da19
......@@ -10,4 +10,6 @@ favicon:FAVICON
logLevel:LOGLEVEL
enableSM3:ENABLE_SM3
disableLogout:DISABLELOGOUT
disableChangePwd:DISABLECHANGEPWD
\ No newline at end of file
disableChangePwd:DISABLECHANGEPWD
publicKey:PUBLICKEY
enableRSA:ENABLERSA
\ No newline at end of file
......@@ -24,4 +24,8 @@ window.Environment = {
version: '0.0.1',
// 启用sm3加密
enableSM3: true,
// 启用rsa加密
enableRSA: true,
// 公钥
publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmk8+KYDkf6dEY5XMzNHRK3+GVDc4hPxyXHygyz7u+xrNhCXQytLhnzyNxl/3kcF/S/W02Sbc/bF9n5Eakbd4Fp7DMqU9j/3Dv9hoLUQjx0RQ+wSPg399orBCWejOJA/bcii8PGPSrj9AttGTDA3gq624zGoDDK8EzjOP+HhY81QIDAQAB',
};
......@@ -95,9 +95,9 @@ export const ChangePassword = defineComponent({
try {
loading.value = true;
let { oldPwd, newPwd } = userData;
if ((ibiz.env as IData).enableSM3) {
oldPwd = ibiz.util.text.sm3(oldPwd).toUpperCase();
newPwd = ibiz.util.text.sm3(newPwd).toUpperCase();
if ((ibiz.env as IData).enableRSA) {
oldPwd = ibiz.util.text.rsa(oldPwd);
newPwd = ibiz.util.text.rsa(newPwd);
}
const res = await ibiz.net.post('/uaa/changepwd', {
oldPwd,
......
......@@ -116,9 +116,9 @@ export const ForgetPassword = defineComponent({
loading.value = true;
const { loginName, verificationCode } = userData;
let { newPwd, comfirmPwd } = userData;
if ((ibiz.env as IData).enableSM3) {
newPwd = ibiz.util.text.sm3(newPwd).toUpperCase();
comfirmPwd = ibiz.util.text.sm3(comfirmPwd).toUpperCase();
if ((ibiz.env as IData).enableRSA) {
newPwd = ibiz.util.text.rsa(newPwd);
comfirmPwd = ibiz.util.text.rsa(comfirmPwd);
}
const res = await ibiz.net.axios({
url: '/v7/forgetPwd',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册