Skip to content

Commit

Permalink
Merge pull request #63 from 2mau/fix/check-wrong-definition-list
Browse files Browse the repository at this point in the history
fix: check wrong presentation definition list
  • Loading branch information
nklomp committed Nov 15, 2023
2 parents 2b3fad1 + f2ce058 commit 9d73d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/authorization-response/PresentationExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class PresentationExchange {
const definitionRefs = extractDataFromPath(authorizationRequestPayload, '$.presentation_definition_uri');
const definitionRefsFromList = extractDataFromPath(authorizationRequestPayload, '$.presentation_definition_uri[*]');
const hasPD = (definitions && definitions.length > 0) || (definitionsFromList && definitionsFromList.length > 0);
const hasPdRef = (definitionRefs && definitionRefs.length > 0) || (definitionRefsFromList && definitionsFromList.length > 0);
const hasPdRef = (definitionRefs && definitionRefs.length > 0) || (definitionRefsFromList && definitionRefsFromList.length > 0);
if (hasPD && hasPdRef) {
throw new Error(SIOPErrors.REQUEST_CLAIMS_PRESENTATION_DEFINITION_BY_REF_AND_VALUE_NON_EXCLUSIVE);
}
Expand Down

0 comments on commit 9d73d56

Please sign in to comment.