Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semicolon usage in describing DID URL params #120

Open
jiyoonie9 opened this issue Mar 2, 2024 · 4 comments
Open

semicolon usage in describing DID URL params #120

jiyoonie9 opened this issue Mar 2, 2024 · 4 comments
Labels
did related to decentralized identifiers enhancement New feature or request

Comments

@jiyoonie9
Copy link
Contributor

currently adding path to did url like did:example:123456789abcdefghi/path;foo=bar;baz=qux?foo=bar&baz=qux#keys-1 will break how the Did parser translates path and params. this fails for both web5-go, web5-kt, and web5-js in the same way.

relevant portion of the spec: https://www.w3.org/TR/did-core/#did-url-syntax
image

we should discuss the use of semicolons, as the spec seems to indicate that we should refrain from using them.

@jiyoonie9
Copy link
Contributor Author

@jiyoonie9 jiyoonie9 added the blocker needs a decision label Mar 2, 2024
@mistermoe
Copy link
Member

same behavior in web5-js as well:

it.only('hehe', () => {
  const didUri = Did.parse('did:example:123456789abcdefghi/path;foo=bar;baz=qux?foo=bar&baz=qux#keys-1');
  console.log(JSON.stringify(didUri, null, 2));
});

output:

{
  "uri": "did:example:123456789abcdefghi",
  "method": "example",
  "id": "123456789abcdefghi",
  "path": "/path;foo=bar;baz=qux",
  "query": "foo=bar&baz=qux",
  "fragment": "keys-1",
  "params": {
    "foo": "bar",
    "baz": "qux"
  }
}

@mistermoe
Copy link
Member

i think it may make the most sense for us to just drop ; param delimiting. @decentralgabe what are your thoughts? only thing i can see about it in the spec is a note that suggests we ought not to use it

@decentralgabe
Copy link
Member

I agree @mistermoe. What would the alternative look like?

@decentralgabe decentralgabe added did related to decentralized identifiers enhancement New feature or request and removed blocker needs a decision labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
did related to decentralized identifiers enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants