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

Allow custom kid to be set in JWS #1239

Merged
merged 12 commits into from
Sep 22, 2023
Merged

Allow custom kid to be set in JWS #1239

merged 12 commits into from
Sep 22, 2023

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Sep 20, 2023

Description of change

  • Allow custom kid to be set in JWS.
  • Allow a custom DID Url to be passed to the verification because the assumption that JWS kid == method ID does not always hold.
  • Remove leftover crits parameter in Wasm bindings that was removed some time ago on the Rust side.
  • Add new Timstamp() constructor, so this does not return a null pointer.
  • Add tests for parsing the option types.
  • Set the kid of a newly generated JWK to its SHA256 base64-encoded thumbprint, as recommended by did-core:

Links to any relevant issues

part of #1103

Type of change

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

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

Added new tests.

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 Sep 20, 2023
@PhilippGackstatter PhilippGackstatter added this to the v0.7 Features milestone Sep 20, 2023
Copy link
Contributor

@abdulmth abdulmth left a comment

Choose a reason for hiding this comment

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

Looks good to me, maybe it would be worth it to add the same Rust test to JS, maybe also test the case when kid isn't set if not tested somewhere else.

@PhilippGackstatter PhilippGackstatter merged commit e434b02 into main Sep 22, 2023
10 checks passed
@PhilippGackstatter PhilippGackstatter deleted the chore/kid-option branch September 22, 2023 10:35
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.

3 participants