Skip to content

Commit

Permalink
update text to specify how ports should be handled
Browse files Browse the repository at this point in the history
  • Loading branch information
kdenhartog authored and dmitrizagidulin committed Nov 17, 2021
1 parent ddd273a commit cb47e60
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ <h2>
</p>
<p>
The method specific identifier MUST match the common name used in the SSL/TLS
certificate, and it MUST NOT include IP addresses or port numbers. Directories
and subdirectories MAY optionally be included, delimited by colons rather
than slashes.
certificate, and it MUST NOT include IP addresses. A port MAY be included and
the colon MUST be percent encoded to prevent a conflict with paths. Directories
and subdirectories MAY optionally be included, delimited by colons rather than
slashes.
</p>

<pre class="nohighlight">
Expand All @@ -211,6 +212,8 @@ <h2>
did:web:w3c-ccg.github.io

did:web:w3c-ccg.github.io:user:alice

did:web:example.com%3A3000
</pre>
</section>

Expand Down Expand Up @@ -284,6 +287,15 @@ <h3>
-> https://w3c-ccg.github.io/user/alice/did.json
</pre>

<p>
If an optional port is specified on the domain, the port colon splitting the
host and the port MUST be percent encoded to prevent collision with the path.
</p>

<pre class="example nohighlight" title="Creating the DID with optional path and port">
did:web:example.com%3A3000:user:alice
-> https://example.com:3000/user/alice/did.json
</pre>
</section>

<section>
Expand All @@ -301,6 +313,9 @@ <h3>
qualified domain name and optional path.
</li>
<li>
If the domain contains a port percent decode the colon.
</li>
<li>
Generate an HTTPS URL to the expected location of the DID document by
prepending <code>https://</code>.
</li>
Expand Down

0 comments on commit cb47e60

Please sign in to comment.