diff --git a/lib/core/versions/1.0/DocumentComposer.ts b/lib/core/versions/1.0/DocumentComposer.ts index ebd826eef..673d23c9e 100644 --- a/lib/core/versions/1.0/DocumentComposer.ts +++ b/lib/core/versions/1.0/DocumentComposer.ts @@ -128,7 +128,8 @@ export default class DocumentComposer { method: { published }, - canonicalId: did + canonicalId: did, + deactivated: true }; return { '@context': DocumentComposer.resolutionObjectContextUrl, diff --git a/lib/core/versions/latest/DocumentComposer.ts b/lib/core/versions/latest/DocumentComposer.ts index ebd826eef..673d23c9e 100644 --- a/lib/core/versions/latest/DocumentComposer.ts +++ b/lib/core/versions/latest/DocumentComposer.ts @@ -128,7 +128,8 @@ export default class DocumentComposer { method: { published }, - canonicalId: did + canonicalId: did, + deactivated: true }; return { '@context': DocumentComposer.resolutionObjectContextUrl, diff --git a/tests/core/DocumentComposer.spec.ts b/tests/core/DocumentComposer.spec.ts index f330e86cb..e064159b0 100644 --- a/tests/core/DocumentComposer.spec.ts +++ b/tests/core/DocumentComposer.spec.ts @@ -239,7 +239,8 @@ describe('DocumentComposer', async () => { method: { published }, - canonicalId: 'did:method:suffix' + canonicalId: 'did:method:suffix', + deactivated: true }); }); }); diff --git a/tests/core/RequestHandler.spec.ts b/tests/core/RequestHandler.spec.ts index dd1ebbf6d..9f6b54fcd 100644 --- a/tests/core/RequestHandler.spec.ts +++ b/tests/core/RequestHandler.spec.ts @@ -340,6 +340,7 @@ describe('RequestHandler', () => { const response = await requestHandler.handleResolveRequest(anyDid); expect(response.status).toEqual(ResponseStatus.Deactivated); + expect(response.body.didDocumentMetadata.deactivated).toEqual(true); }); }); diff --git a/tests/vectors/resolution/afterDeactivate.json b/tests/vectors/resolution/afterDeactivate.json index 7a47fdce0..239bf656a 100644 --- a/tests/vectors/resolution/afterDeactivate.json +++ b/tests/vectors/resolution/afterDeactivate.json @@ -8,6 +8,7 @@ ] }, "didDocumentMetadata": { + "deactivated": true, "method": { "published": true },