diff --git a/json-schemas/jwk-verification-method.json b/json-schemas/jwk-verification-method.json index d18353b33..25d41c947 100644 --- a/json-schemas/jwk-verification-method.json +++ b/json-schemas/jwk-verification-method.json @@ -14,7 +14,10 @@ "type": "string" }, "type": { - "const": "JsonWebKey2020" + "enum": [ + "JsonWebKey", + "JsonWebKey2020" + ] }, "controller": { "$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/did" diff --git a/tests/validation/json-schemas/jwk-verification-method.spec.ts b/tests/validation/json-schemas/jwk-verification-method.spec.ts index cfa074386..70a0add4e 100644 --- a/tests/validation/json-schemas/jwk-verification-method.spec.ts +++ b/tests/validation/json-schemas/jwk-verification-method.spec.ts @@ -26,6 +26,17 @@ describe('JwkVerificationMethod', async () => { ).to.not.throw(); }); + it('should not throw an exception if verificationMethod uses \'JsonWebKey\' type', () => { + expect( + () => validateJsonSchema('JwkVerificationMethod', { + id : 'did:jank:alice#key1', + type : 'JsonWebKey', + controller : 'did:jank:alice', + publicKeyJwk : publicJwk + }) + ).to.not.throw(); + }); + it('should not throw if `id` does not have the DID as prefix', () => { expect( () => validateJsonSchema('JwkVerificationMethod', {