From c8ab0a959ec558d5b5b9f45cb9547897a076a9d5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 26 Sep 2023 17:32:42 +0200 Subject: [PATCH 1/2] add Manufacturer DPP in templates --- ereuse_devicehub/modules/did/templates/anonymous.html | 7 +++++++ ereuse_devicehub/modules/did/templates/operator.html | 7 +++++++ ereuse_devicehub/modules/did/templates/verifier.html | 7 +++++++ ereuse_devicehub/modules/did/views.py | 2 ++ 4 files changed, 23 insertions(+) diff --git a/ereuse_devicehub/modules/did/templates/anonymous.html b/ereuse_devicehub/modules/did/templates/anonymous.html index a154468c..d0c03229 100644 --- a/ereuse_devicehub/modules/did/templates/anonymous.html +++ b/ereuse_devicehub/modules/did/templates/anonymous.html @@ -115,6 +115,13 @@ {{ device_abstract.chid }} +
+
+ Manufacturer DPP: +
+
+
+
Usody Identifier (DHID) diff --git a/ereuse_devicehub/modules/did/templates/operator.html b/ereuse_devicehub/modules/did/templates/operator.html index 797c7cd6..d0528a87 100644 --- a/ereuse_devicehub/modules/did/templates/operator.html +++ b/ereuse_devicehub/modules/did/templates/operator.html @@ -147,6 +147,13 @@ {{ device_abstract.chid|truncate(20, True, '...') }}
+
+
+ Manufacturer DPP: +
+
+
+
Last Digital Passport (Last Dpp): diff --git a/ereuse_devicehub/modules/did/templates/verifier.html b/ereuse_devicehub/modules/did/templates/verifier.html index ac0e17b9..6e377097 100644 --- a/ereuse_devicehub/modules/did/templates/verifier.html +++ b/ereuse_devicehub/modules/did/templates/verifier.html @@ -147,6 +147,13 @@ {{ device_abstract.chid }}
+
+
+ Manufacturer DPP: +
+
+
+
{% if last_dpp %}
diff --git a/ereuse_devicehub/modules/did/views.py b/ereuse_devicehub/modules/did/views.py index 6d661019..6ebf55a7 100644 --- a/ereuse_devicehub/modules/did/views.py +++ b/ereuse_devicehub/modules/did/views.py @@ -172,6 +172,7 @@ class DidView(View): 'dpp': self.id_dpp, 'algorithm': "sha3_256", 'components': components, + 'manufacturer DPP': '', } result = { '@context': ['https://ereuse.org/dpp0.json'], @@ -198,6 +199,7 @@ class DidView(View): 'dpp': d.key, 'document': d.snapshot.json_hw, 'algorithm': "sha3_256", + 'manufacturer DPP': '', } dpps.append(rr) return { From 740007b804930b20a0aa7a3ab46e9330f954a2f7 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 27 Sep 2023 08:03:09 +0200 Subject: [PATCH 2/2] fix env.example --- examples/env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/env.example b/examples/env.example index bfa97453..a4168d50 100644 --- a/examples/env.example +++ b/examples/env.example @@ -2,6 +2,7 @@ DB_USER='dhub' DB_PASSWORD='ereuse' DB_HOST='localhost' DB_DATABASE='devicehub' +SECRET_KEY='aaaa' API_DLT='http://$IP_API_DLT' API_DLT_TOKEN=$TOKEN API_RESOLVER='http://$IP_API_RESOLVER'