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

Add more details about how to dereference path and query of a DID URL. #104

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1016,14 +1016,14 @@ <h2>Dereferencing the Resource</h2>
<li><b>contentStream</b>: <code>null</code></li>
<li><b>contentMetadata</b>: <code>«[ ]»</code></li>
</ol>
</li>

<li>Obtain the <a>DID document</a> for the <var>input <a>DID</a></var> by executing the
<a>DID resolution</a> algorithm as defined in <a href="#resolving"></a>. All
<a href="https://www.w3.org/TR/did-core/#did-parameters">
DID parameters</a> of the <var>input <a>DID URL</a></var> MUST be passed as <var>resolution options</var> to the
<a>DID Resolution</a> algorithm. If the <var>input <a>DID</a></var> does not exist, return a null result.
Otherwise, the result is called the <var>resolved <a>DID document</a></var>.</li>
</li>

<li>If present, separate the <a>DID fragment</a> from the <var>input <a>DID URL</a></var> and continue
with the adjusted <var>input <a>DID URL</a></var>.</li>
Expand All @@ -1035,7 +1035,31 @@ <h2>Dereferencing the Resource</h2>
</ol>
</li>

<li>Otherwise, if the <var>input <a>DID URL</a></var> contains the
<li>If the <var>input <a>DID URL</a></var> contains the
<a href="https://www.w3.org/TR/did-core/#did-parameters">DID parameter</a> <code>hl</code>:
<pre class="example nohighlight">did:example:1234?hl=zQmWvQxTqbG2Z9HPJgG57jjwR154cKhbtJenbyYTWkjgF3e</pre>
<ol class="algorithm"><li>
<p class="issue">TODO: Specify the algorithm for processing the `hl` DID parameter.</p>
</li></ol>
</li>

<li>If the <var>input <a>DID URL</a></var> contains the
<a href="https://www.w3.org/TR/did-core/#did-parameters">DID parameter</a> <code>versionId</code>:
<pre class="example nohighlight">did:example:1234?versionId=1</pre>
<ol class="algorithm"><li>
<p class="issue">TODO: Specify the algorithm for processing the `versionId` DID parameter.</p>
</li></ol>
</li>

<li>If the <var>input <a>DID URL</a></var> contains the
<a href="https://www.w3.org/TR/did-core/#did-parameters">DID parameter</a> <code>versionTime</code>:
<pre class="example nohighlight">did:example:1234?versionTime=2021-05-10T17:00:00Z</pre>
<ol class="algorithm"><li>
<p class="issue">TODO: Specify the algorithm for processing the `versionTime` DID parameter.</p>
</li></ol>
</li>

<li>If the <var>input <a>DID URL</a></var> contains the
<a href="https://www.w3.org/TR/did-core/#did-parameters">
DID parameter</a> <code>service</code> and optionally the <code>relativeRef</code> DID parameter:
<pre class="example nohighlight">did:example:1234?service=files&relativeRef=%2Fmyresume%2Fdoc%3Fversion%3Dlatest</pre>
Expand All @@ -1056,16 +1080,28 @@ <h2>Dereferencing the Resource</h2>
<li>Return the <var>output <a>service endpoint</a> URL</var>.</li>
</ol>
</li>

<li>Otherwise, if the <var>input <a>DID URL</a></var> contains a <a>DID path</a> and/or <a>DID query</a>:
<pre class="example nohighlight">did:example:1234/custom/path?customquery</pre>
<ol class="algorithm">
<li>The applicable <a>DID method</a> MAY specify how to dereference
the <var>input <a>DID URL</a></var>.</li>
the <a>DID path</a> and/or <a>DID query</a> of the <var>input <a>DID URL</a></var>.
<pre class="example nohighlight">did:example:1234/resources/1234</pre>
</li>
<li>An extension specification MAY specify how to dereference
the <a>DID path</a> of the <var>input <a>DID URL</a></var>.
<pre class="example nohighlight">did:example:1234/whois</pre>
</li>
<li>An extension specification MAY specify how to dereference
the <a>DID query</a> of the <var>input <a>DID URL</a></var>.
<pre class="example nohighlight">did:example:1234?transformKey=JsonWebKey</pre>
</li>
<li>The client MAY be able to dereference the <var>input <a>DID URL</a></var>
in an application-specific way.</li>
</ol>
</li>
<li>If neither this algorithm, nor the applicable <a>DID method</a>, nor the client

<li>If neither this algorithm, nor the applicable <a>DID method</a>, nor an extension, nor the client
is able to dereference the <var>input <a>DID URL</a></var>, return the following result:
<ol class="algorithm">
<li><b>dereferencingMetadata</b>: <code>«[ "error" → "notFound" ]»</code></li>
Expand Down
Loading