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

feat: Add did:web resolver #1431

Merged
merged 1 commit into from
Aug 18, 2022
Merged

feat: Add did:web resolver #1431

merged 1 commit into from
Aug 18, 2022

Conversation

sandrask
Copy link
Contributor

@sandrask sandrask commented Aug 17, 2022

  • Calculate orb identifier from web identifier
  • Resolve orb document
  • Transform orb document into web document

Closes #1426

Signed-off-by: Sandra Vrtikapa [email protected]

@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #1431 (57a1b5a) into main (1278d5e) will decrease coverage by 0.07%.
The diff coverage is 87.23%.

@@            Coverage Diff             @@
##             main    #1431      +/-   ##
==========================================
- Coverage   87.95%   87.88%   -0.08%     
==========================================
  Files         207      208       +1     
  Lines       19487    19534      +47     
==========================================
+ Hits        17140    17167      +27     
- Misses       1494     1510      +16     
- Partials      853      857       +4     
Impacted Files Coverage Δ
pkg/document/webresolver/resolvehandler.go 87.23% <87.23%> (ø)
...pub/service/inbox/httpsubscriber/httpsubscriber.go 88.88% <0.00%> (-8.89%) ⬇️
pkg/vct/proofmonitoring/monitoring.go 84.07% <0.00%> (-2.66%) ⬇️
cmd/orb-server/startcmd/start.go 68.37% <0.00%> (-0.31%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

decodedPathAndPort := strings.ReplaceAll(decodedPath, "%3A", ":")

// TODO: this is did:web rule - do we need to deal with http domains?
urlStr := "https://" + decodedPathAndPort
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a startup parameter that dictates whether we use http: enableDevMode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bstasyszyn Removed, this code (check with current domain) is not required.

- Calculate orb identifier from web identifier
- Resolver document
- Transform orb document into web document

Closes trustbloc#1426

Signed-off-by: Sandra Vrtikapa <[email protected]>
@sandrask sandrask merged commit 3c96b69 into trustbloc:main Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create did:web resolver
3 participants