From cdb7f9b709b3a27d9b3441f2905248ec3b97a3bb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 21 Jan 2024 10:42:10 +0000 Subject: [PATCH] Support for DID v1 context within jsonld signature verification --- pyjsonld.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyjsonld.py b/pyjsonld.py index 4a514ee84..fcbccfd3b 100644 --- a/pyjsonld.py +++ b/pyjsonld.py @@ -48,6 +48,7 @@ from context import get_v1schema from context import get_v1security_schema from context import get_activitystreams_schema from context import get_webfinger_context +from context import get_did_v1_context try: from functools import cmp_to_key @@ -455,6 +456,13 @@ def load_document(url): 'document': get_litepub_social() } return doc + elif url == 'https://www.w3.org/ns/did/v1': + doc = { + 'contextUrl': None, + 'documentUrl': url, + 'document': get_did_v1_context() + } + return doc return None except JsonLdError as ex: raise ex