From 2cd6e80b60ac37dfed9dc718d8c94a830e0b76a9 Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Tue, 5 Mar 2024 20:18:44 -0500 Subject: [PATCH] enforcing `controller` type to be a list of string (#118) * updating top level controller field to be a list of string instead of a string * adding changes to resolve.json * fixing verificationmethod type for did jwk * making context be a list of strings --- test-vectors/did_dht/create.json | 4 +++- test-vectors/did_jwk/resolve.json | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test-vectors/did_dht/create.json b/test-vectors/did_dht/create.json index 46ef41d..c4ac38e 100644 --- a/test-vectors/did_dht/create.json +++ b/test-vectors/did_dht/create.json @@ -88,7 +88,9 @@ }, "output": { "id": "did:dht:cyuoqaf7itop8ohww4yn5ojg13qaq83r9zihgqntc5i9zwrfdfoo", - "controller": "did:example:abcd", + "controller": [ + "did:example:abcd" + ], "alsoKnownAs": [ "did:example:efgh", "did:example:ijkl" diff --git a/test-vectors/did_jwk/resolve.json b/test-vectors/did_jwk/resolve.json index b1aec6b..2782cb7 100644 --- a/test-vectors/did_jwk/resolve.json +++ b/test-vectors/did_jwk/resolve.json @@ -8,13 +8,12 @@ "@context": "https://w3id.org/did-resolution/v1", "didDocument": { "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://www.w3.org/ns/did/v1" ], "id": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0", "verificationMethod": [ { - "type": "JsonWebKey2020", + "type": "JsonWebKey", "id": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0#0", "controller": "did:jwk:eyJrdHkiOiJFQyIsInVzZSI6InNpZyIsImNydiI6InNlY3AyNTZrMSIsImtpZCI6ImkzU1BSQnRKS292SEZzQmFxTTkydGk2eFFDSkxYM0U3WUNld2lIVjJDU2ciLCJ4IjoidmRyYnoyRU96dmJMRFZfLWtMNGVKdDdWSS04VEZaTm1BOVlnV3p2aGg3VSIsInkiOiJWTEZxUU1aUF9Bc3B1Y1hvV1gyLWJHWHBBTzFmUTVMbjE5VjVSQXhyZ3ZVIiwiYWxnIjoiRVMyNTZLIn0", "publicKeyJwk": { @@ -53,13 +52,12 @@ "@context": "https://w3id.org/did-resolution/v1", "didDocument": { "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://www.w3.org/ns/did/v1" ], "id": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ", "verificationMethod": [ { - "type": "JsonWebKey2020", + "type": "JsonWebKey", "id": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ#0", "controller": "did:jwk:eyJrdHkiOiJPS1AiLCJ1c2UiOiJzaWciLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiVnRTSFhQbEtEdzFFRW9PajVYTjNYV2hqU1BZVk52WC1lNHZqUk8weVlKQSIsIngiOiJpejcwc3ZTTHhOWmhzRHhlSlFfam5PVmJYM0tGTmtjQmNNaldqWm1YRXNBIiwiYWxnIjoiRWREU0EifQ", "publicKeyJwk": {