update wco apxauth to align it with the BE
This commit is contained in:
@@ -351,7 +351,8 @@ apx.apxauth.recoverykey = (id, aliasoremail) => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const recodata = { tribe: apx.data.headers.xtribe, search: aliasoremail };
|
const recodata = { tribe: apx.data.headers.xtribe, search: aliasoremail };
|
||||||
recodata.emailalias = Checkjson.testformat(aliasoremail, "email")
|
const validator= new Checkjson({properties:{email:{type:"string",format:"email"}}});
|
||||||
|
recodata.emailalias = validator.verify({email:aliasoremail})
|
||||||
? "email"
|
? "email"
|
||||||
: "alias";
|
: "alias";
|
||||||
document.querySelector(`#${id} .msginfo`).innerHTML = "";
|
document.querySelector(`#${id} .msginfo`).innerHTML = "";
|
||||||
@@ -561,7 +562,8 @@ apx.apxauth.createIdentity = async (id, alias, recoemail, passphrase = "") => {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (recoemail.length > 0 && !Checkjson.testformat(recoemail, "email")) {
|
const validator= new Checkjson({properties:{email:{type:"string",format:"email"}}});
|
||||||
|
if (recoemail.length > 0 && !validator.verify({email:recoemail})) {
|
||||||
apx.notification(`#${id} .msginfo`, {
|
apx.notification(`#${id} .msginfo`, {
|
||||||
status: 406,
|
status: 406,
|
||||||
ref: "Pagans",
|
ref: "Pagans",
|
||||||
@@ -664,13 +666,10 @@ apx.apxauth.registerIdentity = async (id, trustedtribe) => {
|
|||||||
const data = {};
|
const data = {};
|
||||||
data.alias = apx.data.tmpauth.keys.alias;
|
data.alias = apx.data.tmpauth.keys.alias;
|
||||||
data.publickey = apx.data.tmpauth.keys.publickey;
|
data.publickey = apx.data.tmpauth.keys.publickey;
|
||||||
console.log(
|
const validator= new Checkjson({properties:{email:{type:"string",format:"email"}}});
|
||||||
apx.data.tmpauth.recoemail,
|
|
||||||
Checkjson.testformat(apx.data.tmpauth.recoemail, "email")
|
|
||||||
);
|
|
||||||
if (
|
if (
|
||||||
apx.data.tmpauth.recoemail &&
|
apx.data.tmpauth.recoemail &&
|
||||||
Checkjson.testformat(apx.data.tmpauth.recoemail, "email")
|
validator.verify({email:apx.data.tmpauth.recoemail})
|
||||||
) {
|
) {
|
||||||
data.passphrase = apx.data.tmpauth.keyspassphrase;
|
data.passphrase = apx.data.tmpauth.keyspassphrase;
|
||||||
data.privatekey = apx.data.tmpauth.keysprivatekey;
|
data.privatekey = apx.data.tmpauth.keysprivatekey;
|
||||||
|
@@ -86,7 +86,11 @@
|
|||||||
"privatri_main_privatri": "apxtri/objects/wwws/admin/src/tpldata/privatri_main_privatri"
|
"privatri_main_privatri": "apxtri/objects/wwws/admin/src/tpldata/privatri_main_privatri"
|
||||||
},
|
},
|
||||||
"schema": [],
|
"schema": [],
|
||||||
"ref": {},
|
"ref": {
|
||||||
|
"Checkjson": "apxtri/models/tplstrings/Checkjson",
|
||||||
|
"Notification": "apxtri/models/tplstrings/Notifications",
|
||||||
|
"Middlewares": "apxtri/models/tplstrings/Middlewares"
|
||||||
|
},
|
||||||
"wco": {},
|
"wco": {},
|
||||||
"appdata": {}
|
"appdata": {}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user