diff --git a/docs/pages/deployment/verifiable-credentials.rst b/docs/pages/deployment/verifiable-credentials.rst index 866962550..4d547af7b 100644 --- a/docs/pages/deployment/verifiable-credentials.rst +++ b/docs/pages/deployment/verifiable-credentials.rst @@ -28,6 +28,22 @@ Or it can fetch the context definition from disk, using a mapping from url to pa The default contexts can be accessed using the embedded file system `assets/contexts`. The contents of this directory can be found on Github: The default loaded contexts can be downloaded from the `Github repo `_. +The node uses JSON-LD contexts to normalize a credential when it creates or verifies a JSON-LD proof (``ldp_vc``, ``ldp_vp``), and to search credentials (``POST /internal/vcr/v2/search``). +So the node must know every context a credential uses; otherwise it can't verify or search it. +Credentials in JWT format (``jwt_vc``) are verified without the contexts. +Context URLs are identifiers: they don't have to resolve, as long as the node has a local mapping for them. + +Built-in contexts (mapped to local files by default, see ``jsonld.contexts.localmapping``): + +- ``https://www.w3.org/2018/credentials/v1``: W3C Verifiable Credentials +- ``https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json``: ``JsonWebSignature2020`` proofs +- ``https://w3id.org/vc/status-list/2021/v1``: StatusList2021 revocation +- ``https://schema.org`` +- ``https://nuts.nl/credentials/v1``: Nuts credentials such as ``NutsOrganizationCredential`` and ``NutsAuthorizationCredential`` +- ``https://nuts.nl/credentials/2024``: ``NutsUraCredential`` + +Background on JSON-LD in Nuts is on the `wiki `_. + Example configuration ^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/pages/integrating/vc.rst b/docs/pages/integrating/vc.rst index 9cc1dc7f3..92a447e03 100644 --- a/docs/pages/integrating/vc.rst +++ b/docs/pages/integrating/vc.rst @@ -17,7 +17,7 @@ The node will add sensible defaults for: You are required to provide the ``credentialSubject``, the ``issuer``, the ``type`` and an optional ``@context`` and ``expirationDate``. If you do not pass a `@context`, it'll be set: ``["https://www.w3.org/2018/credentials/v1", "https://nuts.nl/credentials/v1"]``. Note that this default does not include the latest version of the Nuts JSON-LD context. -The latest Nuts JSON-LD context can be found :ref:`here `. +The Nuts JSON-LD contexts are listed on the `wiki `_. Calling `/internal/vcr/v2/issuer/vc` with diff --git a/docs/pages/technology/jsonld.rst b/docs/pages/technology/jsonld.rst deleted file mode 100644 index ce821b0b7..000000000 --- a/docs/pages/technology/jsonld.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _jsonld: - -JSON-LD -####### - -`JSON Linked Data (JSON-LD) `_ is a lightweight Linked Data format. It is easy for humans to read and write. -It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale. -JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases. - -Within Verifiable Credentials, JSON-LD is used to convert it to a normalized document. Normalization is required for proof generation and validation. - -Nuts Context V1 -*************** - -https://nuts.nl/credentials/v1 \ No newline at end of file