Skip to content

Conversation

@clehner
Copy link
Contributor

@clehner clehner commented Jan 10, 2022

This adds a requirement for a DID Resolution Result HTTP response to set a Content-Type header to indicate that it is a DID Resolution Result, as specified in DID Resolution:

Setting this Content-Type header is proposed in a PR to the ION implementation: decentralized-identity/ion#244.

Without the Content-Type header, a resolver-client might expect the response to be a DID Document rather than a DID Resolution Result, as https://w3c-ccg.github.io/did-resolution/#bindings-https currently specifies that if the Accept header is not used, the HTTP response body contains the DID Document (didDocumentStream) rather than the DID Resolution Result object. Determining the response type from the response body (content sniffing) would be possible, but it may be preferable to rely on the Content-Type header. With this header set, a client can determine that they've received a DID Resolution Result object rather than a DID document, without having to parse the response body.

- `updateCommitment` is the commitment for the next update operation as defined in [commitment schemes](https://identity.foundation/sidetree/spec/#commitment-schemes).
- `recoveryCommitment` is the commitment for the next recover or deactivate operation as defined in [commitment schemes](https://identity.foundation/sidetree/spec/#commitment-schemes).

The DID Resolution Result response ****MUST**** contain a `Content-Type` HTTP header with value `application/ld+json;profile="https://w3id.org/did-resolution"`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering why we would set LD here, as we were hoping to use just plain JSON. The output doc should parse as either, but I think folks were inclined to use plain JSON as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants