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

Web dids #3733

Merged
merged 6 commits into from
Apr 10, 2023
Merged

Web dids #3733

merged 6 commits into from
Apr 10, 2023

Conversation

IanCal
Copy link
Contributor

@IanCal IanCal commented Apr 6, 2023

Adds basic support for resolving web dids. Tests should mock out the remote request but don't currently.

Web dids have a structure of:

did:web:domain

which will try and find a document at https://domain/.well-known/did.json

Or

did:web:domain:subfolder:subfolder2

which will try and find one at https://domain/subfolder/subfolder2/did.json

It's a bit inconsistent but that's how it goes.

I've put sample ones at

https://superb-conkies-141fd5.netlify.app/.well-known/did.json

and

https://superb-conkies-141fd5.netlify.app/subfolder/did.json

Which also show the two ways that should now be supported for pointing at resources - one uses alsoKnownAs and the other a service endpoint:

  "service": [
    {
      "id": "did:web:example.com#resource1",
      "type": "ResourceService",
      "serviceEndpoint": "https://superb-conkies-141fd5.netlify.app/testme"
    }
  ]```

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

ssr-web test results

180 tests  ±0   180 ✔️ ±0   11s ⏱️ -1s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 4591821. ± Comparison against base commit 7138a1b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Apr 6, 2023

web-client test results

528 tests  ±0   528 ✔️ ±0   1m 16s ⏱️ +9s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 4591821. ± Comparison against base commit 7138a1b.

♻️ This comment has been updated with latest results.

@tintinthong tintinthong marked this pull request as ready for review April 9, 2023 07:48
@tintinthong tintinthong self-requested a review April 10, 2023 01:12
Copy link
Contributor

@tintinthong tintinthong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Will add stuff as part of my testing and explanation in separate prs.

@tintinthong tintinthong merged commit 3960762 into main Apr 10, 2023
28 checks passed
@delete-merged-branch delete-merged-branch bot deleted the web-did branch April 10, 2023 01:52
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.

None yet

2 participants