-
Notifications
You must be signed in to change notification settings - Fork 1
Implement W3C DID Resolution HTTPS Binding (v1) #1
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
Open
djscruggs
wants to merge
32
commits into
main
Choose a base branch
from
feature/https-binding-implementation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
ee15db0
Scaffold DID Resolution HTTPS Binding server.
djscruggs 2c04b0b
Complete HTTPS binding implementation with full test suite.
djscruggs 299e49e
Add did:web test suite with nock mock and live tests.
djscruggs 97285c9
Implement service endpoint dereferencing with HTTP 303 redirect.
djscruggs 3f67811
Update README to match implementation.
djscruggs 9584c02
Remove 'All rights reserved.' from copyright headers.
djscruggs 17ce89b
Fix headers.js to use supported set rather than void hack.
djscruggs 2f0bdba
Fix code smells: centralize classifyError, guard decodeURIComponent, …
djscruggs 804740c
Remove CLAUDE.md from tracking; add working docs to .gitignore.
djscruggs 2810889
Add Node.js CI workflow.
djscruggs 59db58e
Address PR review feedback from davidlehn.
djscruggs be54e7d
Upgrade mocha to v11 for Node.js 26 compatibility.
djscruggs 65d57eb
Align error format and DID validation with W3C test suite.
djscruggs 1609431
Fix MUST-level spec gaps: 406 format and deactivated handling.
djscruggs c5ed539
Update README with error format, deactivation, and conformance table.
djscruggs 60b5645
Update copyright year to 2026 across all source files.
djscruggs fa98f8f
Fix JSDoc @returns declarations and description sentences.
djscruggs b182754
Fix remaining lint errors: sentence period and line length.
djscruggs 0deb7a7
Fix contentType in resolution and dereferencing metadata.
djscruggs 8010f73
Update README: all 35 test suite tests pass.
djscruggs e81371c
Address PR review feedback from davidlehn and msporny.
djscruggs 6b219e3
Fix CI failures: lint errors and test suite after spec changes.
djscruggs 92e0148
Fix Accept header matching to use exact token comparison.
djscruggs 742b62e
Link did-io typed error issue in classifyError comment.
djscruggs 30e9a1f
Fix JSDoc sentence capitalization in dereferenceHandler.
djscruggs b6ff396
fix: Align driver-not-found error name with did-io NotSupportedError.
djscruggs 3e7ac54
Use did-io typed NotSupportedError for driver-not-found.
djscruggs 881eb18
Fix JSDoc complete-sentence lint warning in dereference.
djscruggs 4630197
Remove service endpoint dereferencing to close SSRF surface.
djscruggs 41cebee
docs: Align README content types with implementation.
djscruggs 02e6508
Fix decoding, error mapping, and dereferencing format.
djscruggs ed45685
Move tests to test/mocha per DB convention.
djscruggs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Port the server listens on | ||
| PORT=8080 | ||
|
|
||
| # Host the server binds to | ||
| HOST=0.0.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Node.js CI | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
|
djscruggs marked this conversation as resolved.
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 22.x | ||
| - run: npm install | ||
| - name: Run eslint | ||
| run: npm run lint | ||
| test-node: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x, 24.x, 26.x] | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: npm install | ||
| - name: Run tests with Node.js ${{ matrix.node-version }} | ||
| run: npm test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,9 @@ | ||
| SPEC.md | ||
| ARCHITECTURE.md | ||
| CLAUDE.md | ||
| SMELLS*.md | ||
| .env | ||
| node_modules/ | ||
| dist/ | ||
| coverage/ | ||
| .fastembed_cache/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| BSD 3-Clause License | ||
|
|
||
| Copyright (c) 2026 Digital Bazaar, Inc. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
|
|
||
| 1. Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
|
|
||
| 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
|
|
||
| 3. Neither the name of the copyright holder nor the names of its contributors | ||
| may be used to endorse or promote products derived from this software | ||
| without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
| FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /*! | ||
| * Copyright (c) 2026 Digital Bazaar, Inc. | ||
| */ | ||
| import config from '@digitalbazaar/eslint-config/node-recommended'; | ||
|
|
||
| export default [ | ||
| ...config, | ||
| { | ||
| // Mocha test globals | ||
| files: ['test/**/*.js'], | ||
| languageOptions: { | ||
| globals: { | ||
| before: 'readonly', | ||
| after: 'readonly', | ||
| beforeEach: 'readonly', | ||
| afterEach: 'readonly', | ||
| describe: 'readonly', | ||
| it: 'readonly' | ||
| } | ||
| } | ||
| } | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /*! | ||
| * Copyright (c) 2026 Digital Bazaar, Inc. | ||
| */ | ||
| import {driver} from '@digitalbazaar/did-method-key'; | ||
| import {Ed25519VerificationKey2020} from | ||
| '@digitalbazaar/ed25519-verification-key-2020'; | ||
|
|
||
| export const keyDriver = driver(); | ||
|
|
||
| // Register the Ed25519 2020 suite so z6Mk... keys can be resolved. | ||
| keyDriver.use({ | ||
| multibaseMultikeyHeader: 'z6Mk', | ||
| fromMultibase: Ed25519VerificationKey2020.from | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /*! | ||
| * Copyright (c) 2026 Digital Bazaar, Inc. | ||
| */ | ||
| import {driver} from '@digitalbazaar/did-method-web'; | ||
| import {Ed25519VerificationKey2020} from | ||
| '@digitalbazaar/ed25519-verification-key-2020'; | ||
|
|
||
| export const webDriver = driver(); | ||
|
|
||
| // Register the Ed25519 2020 suite so z6Mk... keys in did:web documents | ||
| // can be resolved to their full key material. | ||
| webDriver.use({ | ||
| multibaseMultikeyHeader: 'z6Mk', | ||
| fromMultibase: Ed25519VerificationKey2020.from | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.