mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39: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
|
||||
}
|
||||
|
||||
let claimHasBeenVerified = false, sp, iSp = 0, res, proofData
|
||||
let claimHasBeenVerified = false, sp, iSp = 0, res, proofData, spData = null
|
||||
while (!claimHasBeenVerified && iSp < spMatches.length) {
|
||||
spData = spMatches[iSp]
|
||||
spData.claim.fingerprint = fingerprint
|
||||
|
@ -64,6 +64,7 @@ const verify = async (uri, fingerprint, opts) => {
|
|||
|
||||
return {
|
||||
isVerified: claimHasBeenVerified,
|
||||
matchedServiceprovider: spData ? spData.serviceprovider.name : null,
|
||||
verificationData: spData
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue