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: update OpenID4VCI to WG Draft 12 #63

Closed
wants to merge 53 commits into from

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Feb 26, 2024

Description of change

This change updates the oid4vci crate in order to conform to OpenID4VCI WG Draft 12

Links to any relevant issues

#59

How the change has been tested

No tests are added, but existing tests are updated.
Several test fixtures are updated in oid4vci/tests/examples/*.json
These fixtures are copied from here: https://github.com/openid/OpenID4VCI/tree/1b7cd7426c42dd8d78db3261ed2e85a520ec7041/examples

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@nanderstabel nanderstabel changed the title Feat/oid4vci wg draft 12 feat: update OpenID4VCI to WG Draft 12 Feb 26, 2024
@nanderstabel nanderstabel changed the base branch from dev to feat/extension-trait February 27, 2024 00:45
@nanderstabel nanderstabel added the Breaking change A change to the API that requires a major release. label Feb 28, 2024
@nanderstabel nanderstabel marked this pull request as ready for review February 28, 2024 13:12
@nanderstabel nanderstabel changed the base branch from feat/extension-trait to dev February 28, 2024 13:14
The example files are taken from here:
https://github.com/openid/OpenID4VCI/tree/4ae490afd6955829b4769cb1b547e9e62c824659/examples
`oid4vci/tests/examples/issuer_metadata.json` is removed as it does not
comply anymore with the new `CredentialIssuerMetadata` struct.
as described here: https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-12.html#section-10.2.3-2.11.1

Also changed `Option<Vec<T>>` to `Vec<T>` for simplicity since
`#[serde(skip_serializing_if = "Vec::is_empty", default)]` ensures the
field is not serialized if it's empty.
In the previous solution using:
`#[serde(tag = "type", rename = "openid_credential")]`. instances of
this struct were correctly serialized, but deserialization was not
working as expected. This was due to the fact that serde(tag) does not
work when deserializing.
@nanderstabel nanderstabel force-pushed the feat/oid4vci-wg-draft-12 branch from 55cb215 to 5dc5c8b Compare March 11, 2024 20:30
@nanderstabel nanderstabel marked this pull request as draft March 12, 2024 21:09
* `user_pin_required` is replaced for `tx_code` in the `pre-authorized_code`
grant type.
* Corresponding changes are made in the unit tests
This replaces some encryption related fields in `CredentialIssuerMetadata` as
described here: https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-13.html#section-11.2.3-2.7.1
@nanderstabel
Copy link
Collaborator Author

Closing this PR in favor of #64

@nanderstabel nanderstabel deleted the feat/oid4vci-wg-draft-12 branch March 19, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant