Skip to content

Commit

Permalink
Improve verification method controller check error.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Aug 25, 2024
1 parent b94be77 commit 267f1f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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".`, {
Expand Down

0 comments on commit 267f1f9

Please sign in to comment.