-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement support for signed-ietf-json-patch #33
Merged
tmarkovski
merged 15 commits into
decentralized-identity:main
from
allibell:json_patching
Feb 14, 2022
Merged
Implement support for signed-ietf-json-patch #33
tmarkovski
merged 15 commits into
decentralized-identity:main
from
allibell:json_patching
Feb 14, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allibell
commented
Feb 6, 2022
allibell
commented
Feb 7, 2022
allibell
commented
Feb 7, 2022
as discussed, retitled |
Bump version to beta. Add author.
tmarkovski
approved these changes
Feb 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From #8: implement support per the IETF JSON patch DID extension. This enables us to modify/patch DID documents using JWS payloads.
Notes
PatchedKeyPair
struct which wrapsKeyPair
. this is intuitive, self-explanatory, and minimizes breaking changes a bit.PatchedKeyPair
. we are not performing a DID update operation and the responsibility to manage state (check for DID diffs, maintain patches) falls squarely to the callers.get_did_document
requests still fail silently; a bad request will return the original document without warning. this is to maintain the existing contract of not throwing errors. on the other hand,resolve
requests with bad patches throw an error instead of returning the key. this seems to make sense sinceresolve
is more "internal", i.e. the caller intends to managePatchedKeyPair
state so they should be informed whether that struct has the patches they expectVerificationMethod
s/KeyFormat
s. we'd previously getError("missing field 'key_type'", line: 0, column: 0)
orError("invalid value: map, expected map with a single key", line: 0, column: 0)
due to custom serializingdid_url
andbls12_381_plus
seem to be similar maturity, albeit more necessary). I am open to reimplementing that boilerplate if the tradeoff of minimal dependencies is more important here.Tests
new chunky unit tests. snipped output from
test_json_patch_demo
:full output: https://pastebin.com/HNSDybQz
Follow-ups