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

Generate DID URL from components #166

Merged
merged 2 commits into from
Aug 10, 2024
Merged

Generate DID URL from components #166

merged 2 commits into from
Aug 10, 2024

Conversation

tomdaffurn
Copy link
Contributor

@tomdaffurn tomdaffurn commented Aug 8, 2024

  • Remove URL field from DID type. It was inconsistently populated, and could differ from URI
  • Add a function to calculate the URL from the URI, params, path, query and fragment fields

The result is that URL() will always be consistent with URI, while allowing DID URLs to be parsed and retain all of their information. Value/Scan and String/Parse have symmetrical behaviour so all DIDs can be marshalled and unmarshalled reliably.

Closes #164 #163

@tomdaffurn tomdaffurn changed the title Generate DID URL field from components Generate DID URL from components Aug 8, 2024
@tomdaffurn tomdaffurn merged commit e1c708d into main Aug 10, 2024
5 checks passed
@tomdaffurn tomdaffurn deleted the tom/didjwk-url branch August 10, 2024 00:01
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.

Should DID.String() return URI?
1 participant