Introduce a few user arguments

This commit is contained in:
Kgothatso
2019-12-07 14:55:09 +02:00
parent 04d7675c20
commit 2d9705577c
2 changed files with 10 additions and 4 deletions

View File

@@ -50,10 +50,12 @@ module.exports.authenticate = function(challenge, authenticationRequest, argv) {
const signature = cryptoUtil.signMessage(walletXpriv, challengeDerivationPath, challenge.message).toString('hex');
console.log("Signature: ", signature);
postSignature.postSignature(authenticationRequest.responseEndpoint, {
id: challenge.id,
signature: signature
})
if(argv.p) {
postSignature.postSignature(authenticationRequest.responseEndpoint, {
id: challenge.id,
signature: signature
})
}
} else {
console.error("Challenge not signed by registered service.");
}