Netherlands - Generic Functions for data exchange Implementation Guide
0.3.0 - ci-build

Netherlands - Generic Functions for data exchange Implementation Guide, published by Stichting Nuts. This guide is not an authorized publication; it is the continuous build for version 0.3.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/nuts-foundation/nl-generic-functions-ig/ and changes regularly. See the Directory of published versions

## Request key material [GFI-001]

### Scope

The Resolve key material transaction returns a document containing the public key material for a given entity.

### Actor Roles

Actor | Role
--- | ---
Verifier | Requests key material for a given entity based on a Decentralized Identifier (DID)
Issuer/Holder | Responds to the request with the public key material associated with the DID

### Referenced standards

- DID Core
- DID Resolution
- DID Web Method

### Messages

1. Resolve DID Document Request
2. DID Document Response

#### Resolve DID Document Request

##### Trigger events

A verifier needs to verify the authenticity of a signature on a verifiable credential or presentation.

##### Message semantics

A verifier initiates a resolve DID document request using a HTTP GET request to the DID web url. No further parameters are required. The DID web url is constructed following the rules as defined in the DID Web Method.

##### Example

Example `did:web`

    did:web:example.com:user:alice

Which resolves to the DID document at:

    GET https://example.com/user/alice/did.json

#### DID Document Response

##### Trigger events

The requested party responds to the resolve DID document request.

##### Message semantics

The requested party responds with a `HTTP 200 OK` response containing the DID document in the body of the response. The DID document is a JSON-LD document conforming to the DID Core specification.

##### Example

    {
      "@context": "https://www.w3.org/ns/did/v1",
      "id": "did:web:example.com:user:alice",
      "verificationMethod": [
        {
          "id": "did:web:example.com:user:alice#key-1",
          "type": "JsonWebKey2020",
          "controller": "did:web:example.com:user:alice",
          "publicKeyJwk": {
            "kty": "EC",
            "crv": "P-256",
            "x": "...",
            "y": "..."
          }
        }
      ],
      "authentication": ["did:web:example.com:user:alice#key-1"]
    }

##### Expected actions

Case 1: The DID document is found on the server.

`HTTP 200` (OK) is returned as the HTTP status code.

A DID document is returned in the body of the response.

Case 2: The DID document is not found on the server.

`HTTP 404` (Not Found) is returned as the HTTP status code.

No body is returned in the response.