Support for DID v1 context within jsonld signature verification

main
Bob Mottram 2024-01-21 10:42:10 +00:00
parent a67fe05375
commit cdb7f9b709
1 changed files with 8 additions and 0 deletions

View File

@ -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