diff --git a/index.html b/index.html index f0857b1..3d60882 100644 --- a/index.html +++ b/index.html @@ -2315,17 +2315,9 @@

HTTP(S) Binding

  • Append the input DID to the request HTTP(S) URL.
    https://resolver.example/1.0/identifiers/did:example:1234
  • Set the Accept HTTP request header to `application/did-resolution` - in order to request a complete , OR
  • -
  • set the Accept HTTP request header to the value of the accept resolution option.
  • -
  • If any other resolution options are provided: -
      -
    1. The input DID MUST be URL-encoded (as specified in RFC3986 Section 2.1).
    2. -
    3. Encode all resolution options except accept as - query parameters in the request HTTP(S) URL. -
      https://resolver.example/1.0/identifiers/did%3Aexample%3A1234?option1=value1&option2=value2
    4. -
    -
  • + to request a complete , OR +
  • set the Accept HTTP request header to the value of the accept resolution option + to request only the didDocument value of the result.
  • For the DID URL dereferencing function: @@ -2333,21 +2325,58 @@

    HTTP(S) Binding

  • Append the input DID URL to the request HTTP(S) URL.
    https://resolver.example/1.0/identifiers/did:example:1234?service=files&relativeRef=/resume.pdf
  • Set the Accept HTTP request header to `application/did-url-dereferencing` - in order to request a complete , OR
  • -
  • set the Accept HTTP request header to the value of the accept dereferencing option.
  • -
  • If any other dereferencing options are provided: -
      -
    1. The input DID URL MUST be URL-encoded (as specified in RFC3986 Section 2.1).
    2. -
    3. Encode all dereferencing options except accept as - query parameters in the request HTTP(S) URL. -
      https://resolver.example/1.0/identifiers/did%3Aexample%3A1234%3Fservice%3Dfiles%26relativeRef%3D%2Fresume.pdf?option1=value1&option2=value2
    4. -
    -
  • + to request a complete , OR +
  • set the Accept HTTP request header to the value of the accept dereferencing option + to request only the contentStream value of the result.
  • -
  • Execute an HTTP GET request on the request HTTP(S) URL. This invokes the DID resolution or - DID URL dereferencing function at the remote DID resolver.
  • +
  • For the HTTP(S) GET binding: +
      +
    1. If any other resolution options or dereferencing options than accept are provided: +
        +
      1. The input DID MUST be URL-encoded (as specified in RFC3986 Section 2.1).
      2. +
      3. Encode all resolution options except accept as + query parameters in the request HTTP(S) URL. +
      +
    2. +
    3. Execute an HTTP GET request on the request HTTP(S) URL. This invokes the DID resolution or + DID URL dereferencing function at the remote DID resolver. +
      GET https://resolver.example/1.0/identifiers/did%3Aexample%3A1234?option1=value1&option2=value2 HTTP/1.1
      +Accept: application/did-resolution
      +
      +
      GET https://resolver.example/1.0/identifiers/did%3Aexample%3A1234%3Fservice%3Dfiles%26relativeRef%3D%2Fresume.pdf?option1=value1&option2=value2 HTTP/1.1
      +Accept: application/did-url-dereferencing
      +
      +
    4. +
    +
  • +
  • For the HTTP(S) POST binding: +
      +
    1. If any other resolution options or dereferencing options than accept are provided: +
        +
      1. Encode all resolution options except accept as + a JSON structure in the HTTP request's POST body. +
      +
    2. +
    3. Execute an HTTP POST request on the request HTTP(S) URL. This invokes the DID resolution or + DID URL dereferencing function at the remote DID resolver. +
      POST https://resolver.example/1.0/identifiers/did:example:1234 HTTP/1.1
      +Accept: application/did-resolution
      +
      +{
      +    "option1": "value1",
      +    "option2": "value2"
      +}
      +
      POST https://resolver.example/1.0/identifiers/did:example:1234?service=files&relativeRef=/resume.pdf HTTP/1.1
      +Accept: application/did-url-dereferencing
      +
      +{
      +    "option1": "value1",
      +    "option2": "value2"
      +}
      +
    +
  • If the DID resolution or DID URL dereferencing function returns an error metadata property in the didResolutionMetadata or dereferencingMetadata, then the HTTP response status code MUST correspond to the value of the error metadata property, diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index fcf805e..51b17ab 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -68,6 +68,64 @@ paths: description: The options for resolving the DID or dereferencing the DID URL. style: form explode: true + post: + summary: Resolve a DID / Dereference a DID URL + description:

    This endpoint either resolves a DID, or dereferences a DID URL. + When resolving a DID, + it takes the DID and resolution options as inputs, and + the output is a DID document plus metadata. + When dereferencing a DID URL, + it takes the DID URL and dereferencing options as inputs, and + the output is a DID document, a part of a DID document, or some + other resource identified by the DID URL.

    +

    See the DID + Resolution specification for additional details.

    + operationId: resolve + tags: + - Universal Resolver + parameters: + - in: path + required: true + name: identifier + schema: + type: string + description: The DID to be resolved, or the DID URL to be dereferenced. + examples: + example1: + value: did:indy:sovrin:builder:VbPQNHsvoLZdaNU7fTBeFx + description: A DID using the `indy` method. + example2: + value: did:ion:EiClkZMDxPKqC9c-umQfTkR8vvZ9JPhl_xLDI9Nfk38w5w + description: A DID using the `ion` method. + example3: + value: did:ebsi:z25ZZFS7FweHsm9MX2Qvc6gc + description: A DID using the `ebsi` method. + - in: header + required: false + name: Accept + schema: + type: string + description: The requested media type of the DID document representation or + DID resolution result. + examples: + application/did: + value: application/did + description: Media type of a DID document. + application/did-resolution: + value: application/did-resolution + description: Media type of a DID resolution result. + application/did-url-dereferencing: + value: application/did-url-dereferencing + description: Media type of a DID URL dereferencing result. + requestBody: + content: + application/did-resolution: + schema: + $ref: "#/components/schemas/ResolutionOptions" + application/did-url-dereferencing: + schema: + $ref: "#/components/schemas/DereferencingOptions" + description: The options for resolving the DID or dereferencing the DID URL. responses: "200": description: successfully resolved!