Sphereon-Opensource / OID4VC

OpenID for Verifiable Credentials - modules for issuers, holders and RPs
Apache License 2.0
62 stars 19 forks source link

fix: oid4vci draft 13 typing #129

Closed TimoGlastra closed 1 month ago

TimoGlastra commented 1 month ago

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).

nklomp commented 1 month ago

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

TimoGlastra commented 1 month ago

Resolved comments!