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

fix: oid4vci draft 13 typing #129

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

TimoGlastra
Copy link
Collaborator

A lot of the typing for draft 13 was not according to the spec. I also separated some type definitions per format so we have better type completion. We noticed when integrating draft 13 vs draft 11 in Credo that with draft 13 we lost a lost of format specific typing, which made using the library a lot easier. This aims to bring it back.

With the updates of the types I also discovered some bugs related to transformations, and which keys were used (e.g. types for v11 were still used for v13 even though it should be type now. As well as request in v13 needs to use credential_definition for jwt vc json as well now, which in v11 was still top-level).

Signed-off-by: Timo Glastra <[email protected]>
@TimoGlastra TimoGlastra requested a review from nklomp July 19, 2024 10:56
@nklomp
Copy link
Contributor

nklomp commented Jul 19, 2024

Yeah, the way Draft 13 was initially implemented and later partially/quickly corrected has been a bit of a $#@%-show.

Let me have a look today

Copy link
Contributor

@nklomp nklomp left a comment

Choose a reason for hiding this comment

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

Will have a look into the spec as I seem to recall that format and type are still being used in the appendices for JSON-LD and JWTs

Copy link
Contributor

@nklomp nklomp left a comment

Choose a reason for hiding this comment

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

2 small remakrs. Rest LGTM. Okay to merge after being addressed

packages/common/lib/functions/TypeConversionUtils.ts Outdated Show resolved Hide resolved
packages/common/lib/functions/CredentialRequestUtil.ts Outdated Show resolved Hide resolved
Signed-off-by: Timo Glastra <[email protected]>
@TimoGlastra
Copy link
Collaborator Author

Resolved comments!

@nklomp nklomp merged commit c5cb3cd into Sphereon-Opensource:develop Jul 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants