Skip to content
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

feat: [SIW-352] Presentation submission #22

Merged
merged 9 commits into from
Aug 4, 2023

Conversation

balanza
Copy link
Contributor

@balanza balanza commented Aug 3, 2023

List of Changes

  • add presentation_submission on authorization response payload

Motivation and Context

Satisfy the specification given in https://italia.github.io/eudi-wallet-it-docs/v0.4.1/en/relying-party-solution.html

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

src/rp/index.ts Outdated Show resolved Hide resolved
src/rp/index.ts Outdated
const [, vc_scope] = requestObj.payload.scope;
const presentation_submission = {
definition_id: "32f54163-7166-48f1-93d8-ff217bdb0653",
id: "04a98be3-7fb0-4cf5-af9a-31579c8b0e7d",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value should be randomized

Suggested change
id: "04a98be3-7fb0-4cf5-af9a-31579c8b0e7d",
id: `${uuid.v4()}`,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4a496e4

Copy link
Contributor

@grausof grausof Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uuid.v4() is of type number[]. I think you have to use a string. Also you imported uuid twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b31fb55


expect(fn).toThrow();
expect(fn).rejects.toBe({});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check code review warning: Async assertions must be awaited or returned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests have been fixed in #24, I think we can merge that before

Depends on #24

src/sd-jwt/index.ts Outdated Show resolved Hide resolved
@balanza balanza force-pushed the SIW-352--presentation-submission branch from c2ef778 to 04224c5 Compare August 3, 2023 13:19
@balanza balanza requested a review from grausof August 3, 2023 13:25
Copy link
Contributor

@grausof grausof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@balanza balanza added this pull request to the merge queue Aug 4, 2023
Merged via the queue into master with commit 1503971 Aug 4, 2023
3 checks passed
@balanza balanza deleted the SIW-352--presentation-submission branch August 4, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants