-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for initial-state #23
Closed
Closed
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
be24691
Add support for initial-state
dhh1128 3c02a57
PR feedback: base64url sans pad, other params
dhh1128 f97b972
Method 3 Initial
TelegramSam 593cb53
Full Multi-key Example
TelegramSam 0b41731
Added purpose indicators
TelegramSam 712abc2
Addition of endpoints
TelegramSam 07e6fd3
fixed service encoding
TelegramSam 283a67b
refactor: publicKey -> verificationMethod
0b8a06b
Update core.html
TelegramSam a1f3b2c
Merge pull request #26 from TelegramSam/method3
dhh1128 2f4b4e8
Merge pull request #27 from llorllale/publickey_to_verificationMethod
dhh1128 a9a8149
fixes spec rendering
brianorwhatever f1c40df
Merge pull request #29 from brianorwhatever/patch-1
dhh1128 b4f200b
typo, regex finesse
sklump 202a913
Merge pull request #30 from sklump/sklump-quality-pass
dhh1128 da3c396
fix json syntax
letmaik b448a49
Merge pull request #32 from letmaik/patch-1
dhh1128 2b2fcca
fix of regex and example 4
DenisRybas 3bbda3b
Merge pull request #33 from DenisRybas/fix-001
dhh1128 6fa62b0
Updated examples
ashcherbakov fd2da4a
Support "accept" field in services
ashcherbakov 009dd7c
fix of service encoding in numalgo2
DenisRybas bcc1076
fix of service encoding in numalgo2
DenisRybas 997cc29
fix of service encoding in numalgo2
DenisRybas ee789eb
Mention no padding for bse64 URL safe encoding of services
ashcherbakov e7f2447
Merge pull request #35 from ashcherbakov/master
dhh1128 dad9ad2
Merge branch 'master' of https://github.com/decentralized-identity/pe…
DenisRybas 9f50801
conflicts resolved
DenisRybas d0c3c96
Add additional authors
eabe65f
Merge pull request #37 from dhh1128/master
dhh1128 4fe3eaf
Merge pull request #36 from DenisRybas/fix-service-encoding
dhh1128 0e7cc37
Fix peer DID Doc example
ashcherbakov 0f14981
Merge pull request #38 from ashcherbakov/example-fix
dhh1128 f125900
apply Kyle's suggestions and resolve merge conflict
dhh1128 7affb38
resolve merge conflicts
dhh1128 4223e00
change to camelCase for initialState
dhh1128 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -169,6 +169,9 @@ <h2>Recognizing and handling peer DIDs</h2> | |||||
capture group 1, <code>transform</code> in capture group 2, and <code>encnumbasis</code> in capture group 3. | ||||||
</p> | ||||||
|
||||||
<p>Note that peer DIDs can also be used in DID URIs, with query parameters. Currently, the only query parameter formally defined for peer DIDs is <code>initial-state</code>, discussed <a target="#initial-state">below</a>. However, support for `hl` and `version-id` will be specified soon, | ||||||
and other parameters may be used by a given implementation, so recipients of a peer DID URI should at least be prepared to parse the DID into its base DID value and its query string portion (which begins with the <code>?</code> character. All query parameter values in peer DID URIs are base64url encoded without padding (consistent with JOSE conventions).</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<p>A few peer DID values are reserved and convey special meaning. See <a href="#reserved-values">Reserved Values</a> | ||||||
in the appendix. | ||||||
</p> | ||||||
|
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,5 @@ | ||||||
<h1>DID docs</h1> | ||||||
|
||||||
<p>A special, ultra-simple form of DID doc is supported.</p> | ||||||
|
||||||
<section> | ||||||
<h2>Backing Storage</h2> | ||||||
|
||||||
|
@@ -114,6 +112,37 @@ <h2>CRDTs</h2> | |||||
|
||||||
</section> | ||||||
|
||||||
<section> | ||||||
<h2><code>initial-state</code></h2> | ||||||
<p> | ||||||
Sometimes it is useful (or even required) to communicate a doc-capable peer DID value | ||||||
(one with <code>numalgo</code> != 0) and its genesis or evolved DID doc as a single | ||||||
combined value, instead of sharing the DID as one piece of data, and its DID doc and | ||||||
deltas as another. This situation commonly occurs in connection protocols that are | ||||||
built on <a target="_blank" href="https://identity.foundation/didcomm-messaging/docs/spec/"> | ||||||
DIDComm messaging</a>, for example: <var>A</var> wants to share with <var>B</var> the new | ||||||
pairwise DID they've allocated (A.did@A:B), plus the DID's full DID doc (A.diddoc@A:B), | ||||||
and DIDComm requires all information about the sender to be passed in a single | ||||||
<code>from</code> field. | ||||||
</p> | ||||||
<p> | ||||||
The way to do this is to use the <code>initial-state</code> query parameter of a peer | ||||||
DID URI. All implementations of peer DIDs are required to recognize the meaning of this | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
query parameter, though only implementations that support deltas (layer 2 or 3) need to | ||||||
process it. The parameter value can be extracted from a peer DID URI with the following | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
regex: | ||||||
</p> | ||||||
<pre class="example nohighlight" title="Regex to extract initial-state" id="initial-state-regex"> | ||||||
^did:peer:[^0].+[?](.*&)?initial-state=([^&]*)(?:&|$) | ||||||
</pre> | ||||||
<p> | ||||||
This places the value of the <code>initial-state</code> parameter in capture group 1. | ||||||
</p> | ||||||
<p>To interpret the parameter value, it must first be base64url (minus padding) decoded. The | ||||||
result MUST be a JSON array containing zero or more deltas. An empty parameter value is | ||||||
also allowed, and is considered equivalent to an empty JSON array.</p> | ||||||
</section> | ||||||
|
||||||
<section> | ||||||
<h2><code><dfn>publicKey</dfn></code></h2> | ||||||
|
||||||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.