w3c / did-core

W3C Decentralized Identifier Specification v1.0
https://www.w3.org/TR/did-core/
Other
407 stars 96 forks source link

3.2 DID URL Syntax "Fragment" Example 6 Question #864

Open SaulMoonves opened 1 month ago

SaulMoonves commented 1 month ago

Example 6: A resource external to a DID Document

did:example:123?service=agent&relativeRef=/credentials#degree

So, this dereferences a service in the DID document with an ID fragment of agent. What then does #degree fragment refer to in this context?

Is it meant to be part of relativeRef? If so shouldn't it be percent-encoded?

And, just to be clear, I am reading the spec and agent is meant to be like a relative reference, if I had a service ID that wasn't relative to the DID, I could use the full URI in the parameter value (percent encoded I guess?)

msporny commented 23 hours ago

@SaulMoonves wrote:

So, this dereferences a service in the DID document with an ID fragment of agent. What then does #degree fragment refer to in this context? Is it meant to be part of relativeRef?

Yes.

If so shouldn't it be percent-encoded?

Yes. :)

You might see that we fixed that issue in the latest v1.1 specification:

https://w3c.github.io/did-core/#example-a-resource-external-to-a-did-document

I could use the full URI in the parameter value (percent encoded I guess?)

Yes, you could do that.

I believe that answers your question, and so I'm marking this "pending close" (it'll be closed after 7 days if we don't hear from you). If we didn't answer your question, let us know and we can re-open the issue and discuss. Thanks for your interest in DIDs! :)