diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e4cbde..d30ea32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # bedrock-vc-delivery ChangeLog +## 5.3.3 - 2024-08-dd + +### Fixed +- Improve verification method controller check error. + ## 5.3.2 - 2024-08-24 ### Fixed diff --git a/lib/verify.js b/lib/verify.js index cfbc246..afcfa9e 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -181,9 +181,9 @@ export async function verifyDidProofJwt({workflow, exchange, jwt} = {}) { if(typeof match === 'string') { match = didDoc?.verificationMethod?.find?.(e => e.id === vm.id); } - if(!(match && Array.isArray(match.controller) ? + if(!(match && (Array.isArray(match.controller) ? match.controller.includes(vm.controller) : - match.controller === vm.controller)) { + match.controller === vm.controller))) { throw new BedrockError( `Verification method controller "${issuer}" did not authorize ` + `verification method "${vm.id}" for the purpose of "authentication".`, {