-
Notifications
You must be signed in to change notification settings - Fork 0
feat: [SIW-2088] Update credentials data model to 0.9.1 #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
RiccardoMolinari95
wants to merge
86
commits into
SIW-2087-pid-0.9.x
from
SIW-2088-credentials-data-model-to-0.9.x
Closed
feat: [SIW-2088] Update credentials data model to 0.9.1 #207
RiccardoMolinari95
wants to merge
86
commits into
SIW-2087-pid-0.9.x
from
SIW-2088-credentials-data-model-to-0.9.x
Conversation
This file contains hidden or 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
…dentials-data-model-to-0.9.x
…s-data-model-to-0.9.x
…-credentials-data-model-to-0.9.x
|
grausof
reviewed
Apr 2, 2025
Comment on lines
+210
to
+233
// The credentials to be presented will always include the PID and WIA | ||
// in a credential issuance flow | ||
const credentialsSdJwt = [ | ||
[pid.keyTag, pid.credential], | ||
[WIA_KEYTAG, walletInstanceAttestation], | ||
] as [string, string][]; | ||
|
||
if (!requestObject.dcql_query) { | ||
throw new Error("Invalid request object"); | ||
} | ||
|
||
// Assuming that WIA is a SD-JWT | ||
const dcqlQueryResult = Credential.Presentation.evaluateDcqlQuery( | ||
credentialsSdJwt, | ||
requestObject.dcql_query as DcqlQuery | ||
); | ||
|
||
const credentialsToPresent = dcqlQueryResult.map( | ||
({ requiredDisclosures, ...rest }) => ({ | ||
...rest, | ||
requestedClaims: requiredDisclosures.map(([, claimName]) => claimName), | ||
}) | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say wait before merging. There's some last minute news. See openid/OpenID4VP#318 (comment)
2 tasks
See PR #219. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
Superseded by #219
List of Changes
This PR updates the credential data model to version 0.9.1 of the technical rules(https://italia.github.io/eid-wallet-it-docs/v0.9.1/en/) :
TypeMetadata
of a digital credential (https://italia.github.io/eid-wallet-it-docs/v0.9.1/en/pid-eaa-data-model.html#digital-credential-metadata-type)PID
and theWIA
. (TheWIA
has been considered as a credential in theSD-JWT
format.)Motivation and Context
Updated the credential issuing flow and the credential data model to comply with version 0.9.1 of the technical rules
How Has This Been Tested?
It is currently not possible to test the credential release flow to version 0.9.1 of the technical rules, as we need to wait for the issuer to update to version 0.9.1.
Screenshots (if appropriate):
Checklist: