forked from animo/openid4vc-playground
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Timo Glastra <[email protected]>
- Loading branch information
1 parent
c8544e1
commit 5980202
Showing
6 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,10 @@ | |
"build": "tsc -p tsconfig.json", | ||
"start": "node dist/server.js", | ||
"dev": "tsx watch -r dotenv/config src/server.ts dotenv_config_path=.env.development" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@sphereon/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/dist/authorization-response/PresentationExchange.js b/dist/authorization-response/PresentationExchange.js | ||
index 547a02a7b58e26e0cd8d6b4398abc1fbb456af01..8dfca1c2ae5252e97b3742d764a87cda2c845bbd 100644 | ||
--- a/dist/authorization-response/PresentationExchange.js | ||
+++ b/dist/authorization-response/PresentationExchange.js | ||
@@ -272,15 +272,16 @@ class PresentationExchange { | ||
if (verifyPresentationCallback && evaluationResults.value !== undefined) { | ||
// Verify the signature of all VPs | ||
yield Promise.all(presentationsToVerify.map((presentation) => __awaiter(this, void 0, void 0, function* () { | ||
+ let verificationResult | ||
try { | ||
- const verificationResult = yield verifyPresentationCallback(presentation, evaluationResults.value); | ||
- if (!verificationResult.verified) { | ||
- throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID + (verificationResult.reason ? `. ${verificationResult.reason}` : '')); | ||
- } | ||
+ verificationResult = yield verifyPresentationCallback(presentation, evaluationResults.value); | ||
} | ||
catch (error) { | ||
throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID); | ||
} | ||
+ if (!verificationResult.verified) { | ||
+ throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID + (verificationResult.reason ? `. ${verificationResult.reason}` : '')); | ||
+ } | ||
}))); | ||
} | ||
PresentationExchange.assertValidPresentationSubmission(evaluationResults.value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,10 @@ | |
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.8.3" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@sphereon/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/dist/authorization-response/PresentationExchange.js b/dist/authorization-response/PresentationExchange.js | ||
index 547a02a7b58e26e0cd8d6b4398abc1fbb456af01..8dfca1c2ae5252e97b3742d764a87cda2c845bbd 100644 | ||
--- a/dist/authorization-response/PresentationExchange.js | ||
+++ b/dist/authorization-response/PresentationExchange.js | ||
@@ -272,15 +272,16 @@ class PresentationExchange { | ||
if (verifyPresentationCallback && evaluationResults.value !== undefined) { | ||
// Verify the signature of all VPs | ||
yield Promise.all(presentationsToVerify.map((presentation) => __awaiter(this, void 0, void 0, function* () { | ||
+ let verificationResult | ||
try { | ||
- const verificationResult = yield verifyPresentationCallback(presentation, evaluationResults.value); | ||
- if (!verificationResult.verified) { | ||
- throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID + (verificationResult.reason ? `. ${verificationResult.reason}` : '')); | ||
- } | ||
+ verificationResult = yield verifyPresentationCallback(presentation, evaluationResults.value); | ||
} | ||
catch (error) { | ||
throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID); | ||
} | ||
+ if (!verificationResult.verified) { | ||
+ throw new Error(types_1.SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID + (verificationResult.reason ? `. ${verificationResult.reason}` : '')); | ||
+ } | ||
}))); | ||
} | ||
PresentationExchange.assertValidPresentationSubmission(evaluationResults.value); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.