diff --git a/index.html b/index.html index 62ece27..476984e 100644 --- a/index.html +++ b/index.html @@ -1001,36 +1001,41 @@

DID URL Dereferencing Metadata

Algorithm

The following DID URL dereferencing algorithm MUST be implemented by a conformant DID resolver. - In accordance with [[RFC3986]], it consists of the following steps: Resolving the DID, dereferencing the primary - resource, and dereferencing the secondary resource (only if the input DID URL contains a DID fragment:

+ In accordance with [[RFC3986]], it consists of the following three steps: resolving the DID; dereferencing the + resource; and dereferencing the fragment (only if the input DID URL contains a DID fragment):

-
    -
  1. Validate that the input DID URL conforms to the `did-url` rule of the - DID URL Syntax. - If not, the DID URL dereferencer MUST return the following result: +
    +

    Dereferencing the Resource

      -
    1. dereferencingMetadata: «[ "error" → "invalidDidUrl" ]»
    2. -
    3. contentStream: null
    4. -
    5. contentMetadata: «[ ]»
    6. -
    -
  2. Obtain the DID document for the input DID by executing the - DID resolution algorithm as defined in . All - - DID parameters of the input DID URL MUST be passed as resolution options to the DID - Resolution algorithm. If the input DID does not exist, return a null result. - Otherwise, the result is called the resolved DID document.
  3. -
  4. -
  5. If present, separate the DID fragment from the input DID URL. Execute the algorithm for - , with the input DID URL adjusted - accordingly.
  6. -
  7. If the original input DID URL contained a DID fragment, execute the algorithm for - .
  8. -
+
  • Validate that the input DID URL conforms to the `did-url` rule of the + DID URL Syntax. + If not, the DID URL dereferencer MUST return the following result: -
    -

    Dereferencing the Primary Resource

    -
      -
    1. If the input DID URL contains the +
        +
      1. dereferencingMetadata: «[ "error" → "invalidDidUrl" ]»
      2. +
      3. contentStream: null
      4. +
      5. contentMetadata: «[ ]»
      6. +
      + +
    2. Obtain the DID document for the input DID by executing the + DID resolution algorithm as defined in . All + + DID parameters of the input DID URL MUST be passed as resolution options to the + DID Resolution algorithm. If the input DID does not exist, return a null result. + Otherwise, the result is called the resolved DID document.
    3. + + +
    4. If present, separate the DID fragment from the input DID URL and continue + with the adjusted input DID URL.
    5. + +
    6. If the input DID URL contains no DID path and no DID query: +
      did:example:1234
      +
        +
      1. Return the resolved DID document.
      2. +
      +
    7. + +
    8. Otherwise, if the input DID URL contains the DID parameter service and optionally the relativeRef DID parameter:
      did:example:1234?service=files&relativeRef=%2Fmyresume%2Fdoc%3Fversion%3Dlatest
      @@ -1051,12 +1056,6 @@

      Dereferencing the Primary Resource

    9. Return the output service endpoint URL.
  • -
  • Otherwise, if the input DID URL contains no DID path and no DID query: -
    did:example:1234
    -
      -
    1. Return the resolved DID document.
    2. -
    -
  • Otherwise, if the input DID URL contains a DID path and/or DID query:
    did:example:1234/custom/path?customquery
      @@ -1084,14 +1083,14 @@

      Dereferencing the Primary Resource

  • -
    -

    Dereferencing the Secondary Resource

    +
    +

    Dereferencing the Fragment

    If the input DID URL contains a DID fragment, - then dereferencing of the secondary resource identified by the URL is dependent not on the URI scheme, but - on the media type ([[RFC2046]]) of the primary resource, i.e., on the result of - .

    + then dereferencing of the fragment is dependent + on the media type ([[RFC2046]]) of the resource, i.e., on the result of + .

      -
    1. If the result of is an output service endpoint URL, +
    2. If the result of is an output service endpoint URL, and the input DID URL contains a DID fragment:
      did:example:1234?service=files&relativeRef=%2Fmyresume%2Fdoc%3Fversion%3Dlatest#intro
        @@ -1102,8 +1101,8 @@

        Dereferencing the Secondary Resource

        input DID URL.
      1. Return the output service endpoint URL.
      -
    3. Otherwise, dereference the secondary resource identified by the DID fragment as defined by the media type ([[RFC2046]]) of the primary resource. - For example, if the primary resource is a representation of a DID document with media type application/did+ld+json, then +
    4. Otherwise, dereference the DID fragment as defined by the media type ([[RFC2046]]) of the resource. + For example, if the resource is a representation of a DID document with media type application/did, then the fragment is treated according to the rules associated with the JSON-LD 1.1: application/ld+json media type [JSON-LD11]. @@ -1488,15 +1487,15 @@

      Client-Side Dereferencing

      algorithm may be performed by different components of a Resolver Architecture.

      Specifically, when a DID URL with a DID fragment is dereferenced, then - Dereferencing the Primary Resource is done by + Dereferencing the Resource is done by the DID resolver, and - Dereferencing the Secondary Resource is done by the client.

      + Dereferencing the Fragment is done by the client.

      Example: Given the DID URL did:xyz:1234#keys-1, a DID resolver could be invoked via local binding - for Dereferencing the Primary Resource (i.e., the DID document), + for Dereferencing the Resource (i.e., the DID document), and the client could complete the DID URL dereferencing algorithm by - Dereferencing the Secondary Resource (i.e., a part of the DID document).

      + Dereferencing the Fragment (i.e., a part of the DID document).

      Client-Side Dereferencing

      Example: Given the DID URL did:xyz:1234#keys-1, a DID resolver could be invoked via local binding which invokes another DID resolver via remote binding - for Dereferencing the Primary Resource (i.e., the DID document), + for Dereferencing the Resource (i.e., the DID document), and the client could complete the DID URL dereferencing algorithm by - Dereferencing the Secondary Resource (i.e., a part of the DID document).

      + Dereferencing the Fragment (i.e., a part of the DID document).

      Client-Side Dereferencing

      Example: Given the DID URL did:xyz:1234?service=agent&relativeRef=%2Fsome%2Fpath%3Fquery#frag, a DID resolver could be invoked - for Dereferencing the Primary Resource (i.e., a service endpoint URL), + for Dereferencing the Resource (i.e., a service endpoint URL), and the client could complete the DID URL dereferencing algorithm by - Dereferencing the Secondary Resource (i.e., a service endpoint URL with a fragment).

      + Dereferencing the Fragment (i.e., a service endpoint URL with a fragment).