mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Handle no matching service provider
This commit is contained in:
parent
bdd918df4c
commit
cbd86d81aa
1 changed files with 2 additions and 1 deletions
|
@ -34,7 +34,7 @@ const verify = async (uri, fingerprint, opts) => {
|
||||||
return spMatches
|
return spMatches
|
||||||
}
|
}
|
||||||
|
|
||||||
let claimHasBeenVerified = false, sp, iSp = 0, res, proofData
|
let claimHasBeenVerified = false, sp, iSp = 0, res, proofData, spData = null
|
||||||
while (!claimHasBeenVerified && iSp < spMatches.length) {
|
while (!claimHasBeenVerified && iSp < spMatches.length) {
|
||||||
spData = spMatches[iSp]
|
spData = spMatches[iSp]
|
||||||
spData.claim.fingerprint = fingerprint
|
spData.claim.fingerprint = fingerprint
|
||||||
|
@ -64,6 +64,7 @@ const verify = async (uri, fingerprint, opts) => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isVerified: claimHasBeenVerified,
|
isVerified: claimHasBeenVerified,
|
||||||
|
matchedServiceprovider: spData ? spData.serviceprovider.name : null,
|
||||||
verificationData: spData
|
verificationData: spData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue