Resolve a did:web document
MATTR VII can resolve hosted did:web
s by retrieving their hosted DID document.
Request
Make the following request to retrieve a :
http
1GET https://YOUR_TENANT_URL/v1/dids/did:web:organization.com
Response
json
1{
2 "didDocument": {
3 "@context": [
4 "https://w3.org/ns/did/v1",
5 "https://w3id.org/security/suites/x25519-2019/v1",
6 "https://w3id.org/security/suites/ed25519-2018/v1",
7 "https://w3id.org/security/bbs/v1"
8 ],
9 "id": "did:web:organization.com",
10 "verificationMethod": [
11 {
12 "id": "did:web:organization.com#CfZMD88eoh",
13 "controller": "did:web:organization.com",
14 "type": "Ed25519VerificationKey2018",
15 "publicKeyBase58": "CfZMD88eohsizC7XwamxwNVFuQaowN3fpNRW6rBjBEMy"
16 }
17 ],
18 "authentication": [
19 "did:web:organization.com#CfZMD88eoh"
20 ],
21 "assertionMethod": [
22 "did:web:organization.com#CfZMD88eoh"
23 ],
24 "capabilityDelegation": [
25 "did:web:organization.com#CfZMD88eoh"
26 ],
27 "capabilityInvocation": [
28 "did:web:organization.com#CfZMD88eoh"
29 ],
30 "keyAgreement": [
31 {
32 "id": "did:web:organization.com#6FstRAzj71",
33 "controller": "did:web:organization.com",
34 "type": "X25519KeyAgreementKey2019",
35 "publicKeyBase58": "6FstRAzj71Yb2BYGy62uMFA6G4vcAkvRTnqQ7sherD9x"
36 }
37 ]
38 },
39 "registrationStatus": "COMPLETED",
40 "localMetadata": {
41 "keys": [
42 {
43 "didDocumentKeyId": "did:web:organization.com#CfZMD88eoh",
44 "kmsKeyId": "CfZMD88eohsizC7XwamxwNVFuQaowN3fpNRW6rBjBEMy"
45 },
46 {
47 "didDocumentKeyId": "did:web:organization.com#9hvq54oWSa",
48 "kmsKeyId": "6FstRAzj71Yb2BYGy62uMFA6G4vcAkvRTnqQ7sherD9x"
49 }
50 ],
51 "registered": 1600731355153,
52 "initialDidDocument": {
53 "@context": [
54 "https://w3.org/ns/did/v1",
55 "https://w3id.org/security/suites/x25519-2019/v1",
56 "https://w3id.org/security/suites/ed25519-2018/v1",
57 "https://w3id.org/security/bbs/v1"
58 ],
59 "id": "did:web:organization.com",
60 "verificationMethod": [
61 {
62 "id": "did:web:organization.com#CfZMD88eoh",
63 "controller": "did:web:organization.com",
64 "type": "Ed25519VerificationKey2018",
65 "publicKeyBase58": "CfZMD88eohsizC7XwamxwNVFuQaowN3fpNRW6rBjBEMy"
66 }
67 ],
68 "authentication": [
69 "did:web:organization.com#CfZMD88eoh"
70 ],
71 "assertionMethod": [
72 "did:web:organization.com#CfZMD88eoh"
73 ],
74 "capabilityDelegation": [
75 "did:web:organization.com#CfZMD88eoh"
76 ],
77 "capabilityInvocation": [
78 "did:web:organization.com#CfZMD88eoh"
79 ],
80 "keyAgreement": [
81 {
82 "id": "did:web:organization.com#6FstRAzj71",
83 "controller": "did:web:organization.com",
84 "type": "X25519KeyAgreementKey2019",
85 "publicKeyBase58": "6FstRAzj71Yb2BYGy62uMFA6G4vcAkvRTnqQ7sherD9x"
86 }
87 ]
88 }
89 }
90}
The tenant can prove ownership of the keys associated with the did:web
DID Document through the well-known endpoint https://tenant.vii.mattr.global/.well-known/did-configuration
. The fact that the DID Document is hosted on the domain links it to the DID.
Resolving DID:web from custom domains
If the DID document is hosted on a custom domain like organization.com
, the domain should be prefixed with https://
and suffixed with /.well-known/did.json:
https://organization.com/.well-known/did.json