build-trust / did

A golang package to work with Decentralized Identifiers (DIDs)
https://w3c-ccg.github.io/did-spec
Apache License 2.0
91 stars 21 forks source link

Should a semi-colon be allowed in a specific-idstring? #3

Closed mrinalwadhwa closed 5 years ago

mrinalwadhwa commented 6 years ago

The current version of the DID spec includes examples like this: did:example:123456789abcdefghi;photos

However the grammar doesn't allow that semi-colon. Does this mean that specific schemes can override the generic scheme?

did-reference      = did [ "/" did-path ] [ "#" did-fragment ]
did                = "did:" method ":" specific-idstring
method             = 1*methodchar
methodchar         = %x61-7A / DIGIT
specific-idstring  = idstring *( ":" idstring )
idstring           = 1*idchar
idchar             = ALPHA / DIGIT / "." / "-"
mrinalwadhwa commented 5 years ago

found some discussion about it in the public-credentials mailing list https://lists.w3.org/Archives/Public/public-credentials/2018Feb/thread.html#msg33

mrinalwadhwa commented 5 years ago

Asked this question on the public-credentials mailing list https://lists.w3.org/Archives/Public/public-credentials/2018Nov/thread.html#msg159

mrinalwadhwa commented 5 years ago

https://github.com/w3c-ccg/did-spec/issues/85 https://github.com/w3c-ccg/did-spec/issues/90

mrinalwadhwa commented 5 years ago

Markus Sabadello wrote: A specific DID method can certainly NOT override the generic ABNF!

Dmitri Zagidulin wrote: the example URIs in the spec that contain semicolons aren't DIDs themselves, they are DID-based Service URIs. (The semicolon is a proposed mechanism to separate the DID part from the service locator part). Take a look at the discussion at that PR #90

mrinalwadhwa commented 5 years ago

Added #6 to implement