Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

feat: implemented OIDC presentation submission API #453

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

birtony
Copy link
Contributor

@birtony birtony commented Nov 4, 2022

Fixes #433

Signed-off-by: Anton Biriukov anton.biriukov@avast.com

@birtony birtony added enhancement New feature or request wip Work in progress labels Nov 4, 2022
@birtony birtony self-assigned this Nov 4, 2022
@cla-bot cla-bot bot added the cla-signed label Nov 4, 2022
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Base: 85.30% // Head: 85.30% // No change to project coverage 👍

Coverage data is based on head (b8e42ed) compared to base (f56e856).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #453   +/-   ##
=======================================
  Coverage   85.30%   85.30%           
=======================================
  Files          14       14           
  Lines        1320     1320           
=======================================
  Hits         1126     1126           
  Misses        120      120           
  Partials       74       74           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@birtony birtony changed the title (WIP) feat: implemented OIDC presentation submission API feat: implemented OIDC presentation submission API Nov 4, 2022
@birtony birtony marked this pull request as ready for review November 4, 2022 17:06
@birtony birtony force-pushed the issue433 branch 2 times, most recently from 860f9f2 to 1f436c4 Compare November 4, 2022 18:01
cmd/wallet-js-sdk/src/oidc/presentation/openid4vp.js Outdated Show resolved Hide resolved
}

const vpToken = new Object();
Object.defineProperty(vpToken, "presentation_submission", {
Copy link
Member

Choose a reason for hiding this comment

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

just curious about this syntax,

Why can't

``
var vpToken = {}
vpToken. presentation_submission = presentationSubmission

``

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This way, the properties inside the vpToken object are not modifiable

Copy link
Member

@sudeshrshetty sudeshrshetty Nov 7, 2022

Choose a reason for hiding this comment

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

they are local fields, simply making them var type doesn't hurt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cannot use this syntax to create property @context on the object, which is required for https://github.com/trustbloc/agent-sdk/pull/453/files#diff-73c781567add49e4fe09e28cea2e4f4530d4999259ce327f63a89dc043d3d68dR199

I figured it'd be better to be consistent with the approach I take

Copy link
Member

Choose a reason for hiding this comment

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

vpToken["@context"] = ctx

Signed-off-by: Anton Biriukov <anton.biriukov@avast.com>
}

const vpToken = new Object();
Object.defineProperty(vpToken, "presentation_submission", {
Copy link
Member

Choose a reason for hiding this comment

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

vpToken["@context"] = ctx

@sudeshrshetty sudeshrshetty merged commit 92328b3 into main Nov 8, 2022
@rolsonquadras rolsonquadras deleted the issue433 branch November 8, 2022 19:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenID4VP] Implement OIDC Submit Presentation API in wallet-sdk
3 participants