Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
fix: Do not put the VP token in the id token for OID4VP versions abov…
Browse files Browse the repository at this point in the history
…e v10 as a default if not explicit location is provided
  • Loading branch information
nklomp committed Feb 9, 2024
1 parent 63044ce commit 5d8648a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sphereon/did-auth-siop",
"version": "0.6.0-unstable.7",
"version": "0.6.0-unstable.9",
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/authorization-response/OpenID4VP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ export const putPresentationSubmissionInLocation = async (
presentationDefinitions: await authorizationRequest.getPresentationDefinitions(),
}));

const location = resOpts.presentationExchange?.vpTokenLocation ?? (idTokenType ? VPTokenLocation.ID_TOKEN : VPTokenLocation.AUTHORIZATION_RESPONSE);
const location =
resOpts.presentationExchange?.vpTokenLocation ??
(idTokenType && version < SupportedVersion.SIOPv2_D11 ? VPTokenLocation.ID_TOKEN : VPTokenLocation.AUTHORIZATION_RESPONSE);

switch (location) {
case VPTokenLocation.TOKEN_RESPONSE: {
Expand Down

0 comments on commit 5d8648a

Please sign in to comment.