generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test vectors for
did:web
resolution (#67)
* WIP * Add did:jwk resolve vectors * add example structure * Mention vectors in readme * linting * More detail in vector structure * linting * Added did:web resolution test vectors * Added required metadata * Update index.html * Some additional goodies * Merge snafu * Fix the build * Added error cases. --------- Co-authored-by: Phoebe Lew <[email protected]>
- Loading branch information
1 parent
c7c1f35
commit 5385c51
Showing
6 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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,92 @@ | ||
{ | ||
"description": "did:web resolution", | ||
"vectors": [ | ||
{ | ||
"description": "resolves to a well known URL", | ||
"input": { | ||
"didUri": "did:web:example.com", | ||
"mockServer": { | ||
"https://example.com/.well-known/did.json": { | ||
"id": "did:web:example.com" | ||
} | ||
} | ||
}, | ||
"output": { | ||
"didResolutionMetadata": {}, | ||
"didDocument": { | ||
"id": "did:web:example.com" | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "resolves to a URL with a path", | ||
"input": { | ||
"didUri": "did:web:w3c-ccg.github.io:user:alice", | ||
"mockServer": { | ||
"https://w3c-ccg.github.io/user/alice/did.json": { | ||
"id": "did:web:w3c-ccg.github.io:user:alice" | ||
} | ||
} | ||
}, | ||
"output": { | ||
"didResolutionMetadata": {}, | ||
"didDocument": { | ||
"id": "did:web:w3c-ccg.github.io:user:alice" | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "resolves to a URL with a path and a port", | ||
"input": { | ||
"didUri": "did:web:example.com%3A3000:user:alice", | ||
"mockServer": { | ||
"https://example.com:3000/user/alice/did.json": { | ||
"id": "did:web:example.com%3A3000:user:alice" | ||
} | ||
} | ||
}, | ||
"output": { | ||
"didResolutionMetadata": {}, | ||
"didDocument": { | ||
"id": "did:web:example.com%3A3000:user:alice" | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "methodNotSupported error returned when did method is not web", | ||
"input": { | ||
"didUri": "did:dht:gb46emk73wkenrut43ii67a3o5qctojcaucebth7r83pst6yeh8o" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "methodNotSupported" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "notFound error returned when domain does not exist", | ||
"input": { | ||
"didUri": "did:web:doesnotexist.com" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "notFound" | ||
} | ||
}, | ||
"errors": true | ||
}, | ||
{ | ||
"description": "invalidDid error returned for domain name with invalid character", | ||
"input": { | ||
"didUri": "did:web:invalidcharø.com" | ||
}, | ||
"output": { | ||
"didResolutionMetadata": { | ||
"error": "invalidDid" | ||
} | ||
}, | ||
"errors": true | ||
} | ||
] | ||
} |
This file contains 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 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