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

Remove reexported Resolver validation APIs #1183

Merged
merged 25 commits into from
Jun 13, 2023

Conversation

PhilippGackstatter
Copy link
Contributor

Description of change

Remove the reexported Resolver APIs that re-expose functionality from CredentialValidator and PresentationValidator. The latter APIs should be used instead.

Resolving and validating is slightly more hands-on now as a result, but reduces the Resolver's API surface and therefore complexity significantly. It also gives a better decoupling of resolution and validation, especially for handling errors that occur in either of those processes. The resolver Error also no longer has to re-export the validation errors, making it simpler too.

Overall this should result in less complexity for the user as well as the maintainers with not much impact on the API as is evident by the updated examples.

This also updates some examples to use the new JWT-based APIs, since this PR is part of a larger effort to remove the old Validators in favor of the new JWT-based ones.

Links to any relevant issues

part of #1103

Type of change

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

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Updated examples and ran them successfully.

Change 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

@PhilippGackstatter PhilippGackstatter added Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Jun 12, 2023
@PhilippGackstatter PhilippGackstatter added this to the v0.7 Features milestone Jun 12, 2023
@PhilippGackstatter PhilippGackstatter changed the base branch from feat/jwt-domain-linkage to main June 12, 2023 07:49
bindings/wasm/examples/src/0_basic/6_create_vp.ts Outdated Show resolved Hide resolved
examples/0_basic/6_create_vp.rs Outdated Show resolved Hide resolved
bindings/wasm/examples/src/0_basic/6_create_vp.ts Outdated Show resolved Hide resolved
@PhilippGackstatter PhilippGackstatter merged commit 4f27434 into main Jun 13, 2023
@PhilippGackstatter PhilippGackstatter deleted the chore/remove-resolver-validation-apis branch June 13, 2023 06:52
@abdulmth abdulmth mentioned this pull request Jun 22, 2023
4 tasks
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. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
Development

Successfully merging this pull request may close these issues.

2 participants