TBD54566975 / web5-go

Apache License 2.0
6 stars 6 forks source link

did:web Create() URL-safe encoded path parameters #91

Open KendallWeihe opened 4 months ago

KendallWeihe commented 4 months ago

The spec specifically describes how to handle a port in a given domain https://w3c-ccg.github.io/did-method-web/#example-creating-the-did-with-optional-path-and-port

...but what about other special characters in a path. For example, what about a space /something/with a/space/did.json?

Should all path params be percent encoded?

What about query params?


Right now our code handles the port scenario %3A but what about other special characters?

KendallWeihe commented 3 months ago

It's unclear to me from the did:web spec if other special characters ought to be percent encoded; the port is specifically referenced in the spec (link in the description) for obvious reasons being that the colon character is in direct conflict with the DID syntax, but unclear to me if other special characters should be percent encoded.

To further confuse the matter, did:web's paths are to be delimited by a colon, but on the other hand the DID Core spec supports paths on the DID URL.

Step one in this ticket is to determine what the ruleset here is, and that may include reaching out to the did:web author's.