From 92e9517b7e7b960d3eef895b56cdf02277f191fe Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 14 Mar 2024 19:18:19 +0100 Subject: [PATCH 1/6] add langs pdf and split from file-scheme --- ...Model_Certificat_html_941e7b967953b3f3.jpg | Bin 0 -> 6245 bytes .../certificates/course-credential_ca.html | 126 ++++++++++++++++++ .../certificates/course-credential_es.html | 126 ++++++++++++++++++ .../federation-membership_ca.html | 122 +++++++++++++++++ .../federation-membership_es.html | 122 +++++++++++++++++ idhub/templates/idhub/user/credential.html | 23 ++-- idhub/urls.py | 2 +- idhub/user/views.py | 66 +++++---- 8 files changed, 551 insertions(+), 36 deletions(-) create mode 100644 idhub/static/images/4_Model_Certificat_html_941e7b967953b3f3.jpg create mode 100644 idhub/templates/certificates/course-credential_ca.html create mode 100644 idhub/templates/certificates/course-credential_es.html create mode 100644 idhub/templates/certificates/federation-membership_ca.html create mode 100644 idhub/templates/certificates/federation-membership_es.html diff --git a/idhub/static/images/4_Model_Certificat_html_941e7b967953b3f3.jpg b/idhub/static/images/4_Model_Certificat_html_941e7b967953b3f3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..12e9a3ea3555b618f8c349d9be41e24ccc6fff22 GIT binary patch literal 6245 zcmb7J2{hYVw@<{}R#CK7Du|jILx>?Y&xuP2+M4Q;1VIv!n1`y;Q4KNlwl!2MrlPHR zDB3EDqD83~u9~T-YG|u?(L22FTkpPay?3&*R`&kyy?=ZBpLI_5KJ1MH_)%s^GXM|> z1pLbS0QNotL`*{no&bQA6+i(10C2OuthM(Mbl;ms^G7Hvlc-AWII;&`2}>p_hq(JI zt177|19bF5{N1s>cpBIP??oW#O0Cp4Nr4GCU8!?$D-|n$W4t%PA}j!J7iMjb4fDln zjz=c|=ZV0W znEi>yqI9MHj4L=eSSeUdi5%ditg5Z8t*io5hQXjL2`Dv`L~{>;lBm)@ZTw-x1W&~V z5d3KbG6}qI)ZK#|NYj;Kx%)>PM1L!*zit0x&WObQ;C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mO2eG-1HuzhGB4;OS6q(s zB6qpoNZ5o5Kek>-L)KB~#6YtyOGN*CYw<)s{#~5Yedv|*_FB_<_9DFpu!jo7Vv?r} zzdSZA*6(w4|SoeBU5}v7FR>${CXeGt{aqbw-rsW89i4UG^!~t zAZnNiIUW3(XuxTg6%c`VI-cDm=7}cOn$*Aap~=#}9F{HQMenW}j$a-(Q#^F0$l=ud zOJwEy;|oIr3~RWT$U~+0PKLZQ=aYZ91^Ku09gE;NSGxIP3)d7>#g8uhl)rX}^s66LpK7V)wOsujIZt87LPF(bW6WzN>M#|94bu32WY^0BB<*-EyR{Pi zXWDJman##PzHdLa3B=o9-Y(Equ8SisUae2~O53?O@8-1iz>a`Y3ThqOpv0|buVw53 zRGo9ly2-{fS1E?;a)!I8;saOOD;S=?2UDJYPpmll!|>SlEg!L=`Zb5IwLu$+4)VY5 z0gxr=JH_u7E9>8m($+Kk^2%q?uW-f4KczB#oCUq7Sw9^U8{yz=54Ayb<69>yjKvlUb1L!NK;-uT}3AuN8J zdM^ETpRIc3Qxy;4#|ny+mXj`y&t-?7A3Tg2Dr>gAYxzsXm3sy+F_)sb@;D+DTJPoB zl{?pUzKVO~oA!8Y@YPY%-5vtUAwcf`P`Ll)mWx$VuDzk{;{bpO>t^qd#rkW&9UuY$ S9)$prp8I!h!1UDr!T2wU()I)Z literal 0 HcmV?d00001 diff --git a/idhub/templates/certificates/course-credential_ca.html b/idhub/templates/certificates/course-credential_ca.html new file mode 100644 index 0000000..1d1913f --- /dev/null +++ b/idhub/templates/certificates/course-credential_ca.html @@ -0,0 +1,126 @@ +{% load i18n static %} + + + +Certificat + + + + + + + + + +
+
+
+ +
+
+
+
+ + LAFEDE.CAT – ORGANITZACIONS PER A LA JUSTÍCIA GLOBAL
CERTIFICA QUE:

+ {{ firstName }} {{ lastName }} amb DNI {{ document_id|default:"falta el dni" }}
+ Ha realitzat el curs {{ courseName }}, a {{ address|default:"falta address" }} / de manera {{ modeOfInstruction }}, els dies {{ date_course|default:"falta fecha del curso" }}
+ La durada del curs ha estat de {{ courseDuration }} hores lectives corresponents a {{ courseDays }} sessions.
+
+
+
+
+
+ I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issuedDate }} +
+
+ +
+
+ +
+
+ +
+
+ Pepa Martínez Peyrats
+ Directora
+ Lafede.cat - Federació d'Organitzacions per a la Justícia Global +
+
+ {% if qr %} +
+
+ +
+
+ {% endif %} +
+
+ Organitza: + Amb el suport de: + Amb la col·laboració de: +
+
+
+ +
+
+
+
+ + diff --git a/idhub/templates/certificates/course-credential_es.html b/idhub/templates/certificates/course-credential_es.html new file mode 100644 index 0000000..32056c6 --- /dev/null +++ b/idhub/templates/certificates/course-credential_es.html @@ -0,0 +1,126 @@ +{% load i18n static %} + + + +Certificado + + + + + + + + + +
+
+
+ +
+
+
+
+ + LAFEDE.CAT – ORGANIZACIONES PARA LA JUSTÍCIA GLOBAL
CERTIFICA QUE:

+ {{ firstName }} {{ lastName }} con DNI {{ document_id|default:"falta el dni" }}
+ Ha realizado el curso {{ courseName }}, en {{ address|default:"falta address" }} / de manera {{ modeOfInstruction }}, los días {{ date_course|default:"falta fecha del curso" }}
+ La duración del curso ha sido de {{ courseDuration }} horas lectivas correspondientes a {{ courseDays }} sessiones.
+
+
+
+
+
+ Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issuedDate }} +
+
+ +
+
+ +
+
+ +
+
+ Pepa Martínez Peyrats
+ Directora
+ Lafede.cat - Federación de Organizaciones por la Justícia Global +
+
+ {% if qr %} +
+
+ +
+
+ {% endif %} +
+
+ Organiza: + Con el soporte de: + Con la colaboración de: +
+
+
+ +
+
+
+
+ + diff --git a/idhub/templates/certificates/federation-membership_ca.html b/idhub/templates/certificates/federation-membership_ca.html new file mode 100644 index 0000000..3b83531 --- /dev/null +++ b/idhub/templates/certificates/federation-membership_ca.html @@ -0,0 +1,122 @@ +{% load i18n static %} + + + +Certificat + + + + + + + + + +
+
+
+ +
+
+
+
+

A qui correspongui,

+

+ Pepa Martínez Peyrats, com a directora de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, +

+
+
+ +
+
+ CERTIFICA
+
    +
  • + Que l’entitat {{ legalName }}, amb NIF {{ registrationIdentifier }} i domicili a {{ streetAddress }} {{ postCode }} {{ city }} forma part com a entitat membre de {{ federation }} (ple dret/observadora) de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, des de l’Assemblea General Ordinària celebrada el {{ membershipSince }} +
  • +
+
+
+
+ I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issue_date_now }} +
+
+ +
+
+ +
+
+ +
+
+ Pepa Martínez Peyrats
+ Directora
+ Lafede.cat - Federació d'Organitzacions per a la Justícia Global +
+
+ {% if qr %} +
+
+ +
+
+ {% endif %} +
+ + diff --git a/idhub/templates/certificates/federation-membership_es.html b/idhub/templates/certificates/federation-membership_es.html new file mode 100644 index 0000000..ef4a06f --- /dev/null +++ b/idhub/templates/certificates/federation-membership_es.html @@ -0,0 +1,122 @@ +{% load i18n static %} + + + +Certificado + + + + + + + + + +
+
+
+ +
+
+
+
+

A quién corresponda,

+

+ Pepa Martínez Peyrats, como directora de Lafede.cat - Federación de Organizaciones para la Justícia Global, +

+
+
+ +
+
+ CERTIFICA
+
    +
  • + Que la entidad {{ legalName }}, con NIF {{ registrationIdentifier }} y domicilio {{ streetAddress }} {{ postCode }} {{ city }} forma parte como entidad miembro de {{ federation }} (por el derecho/observadora) de Lafede.cat - Federación de Organizaciones para la Justícia Global, desde la Asamblea General Ordinaria celebrada el {{ membershipSince }} +
  • +
+
+
+
+ Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issue_date_now }} +
+
+ +
+
+ +
+
+ +
+
+ Pepa Martínez Peyrats
+ Directora
+ Lafede.cat - Federació d'Organitzacions per a la Justícia Global +
+
+ {% if qr %} +
+
+ +
+
+ {% endif %} +
+ + diff --git a/idhub/templates/idhub/user/credential.html b/idhub/templates/idhub/user/credential.html index 9e1e0f4..6362a5e 100644 --- a/idhub/templates/idhub/user/credential.html +++ b/idhub/templates/idhub/user/credential.html @@ -9,19 +9,24 @@ {{ subtitle }} -
- {% if object.get_status == 'Issued' %} -
- {% if object.eidas1_did and admin_validated %} - {% trans 'Download as PDF' %} - {% endif %} - {% trans 'Download as JSON' %} + {% if object.get_status == 'Issued' %} + {% if object.eidas1_did and admin_validated %} + + {% endif %} + {% endif %} +
+ {% if object.get_status == 'Issued' %} + {% if object.eidas1_did and admin_validated %} + {% endif %} + {% trans 'Download as JSON' %} + {% endif %} {% if object.get_status == 'Enabled' %} - {% endif %}
diff --git a/idhub/urls.py b/idhub/urls.py index d0230c9..9ecc8d0 100644 --- a/idhub/urls.py +++ b/idhub/urls.py @@ -73,7 +73,7 @@ urlpatterns = [ name='user_credentials'), path('user/credentials/', views_user.CredentialView.as_view(), name='user_credential'), - path('user/credentials//pdf', views_user.CredentialPdfView.as_view(), + path('user/credentials//pdf/', views_user.CredentialPdfView.as_view(), name='user_credential_pdf'), path('credentials//', views_user.CredentialJsonView.as_view(), name='user_credential_json'), diff --git a/idhub/user/views.py b/idhub/user/views.py index 6db3500..50e0dd3 100644 --- a/idhub/user/views.py +++ b/idhub/user/views.py @@ -209,14 +209,19 @@ class CredentialView(MyWallet, TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) + url_ca = reverse_lazy('idhub:user_credential_pdf', args=[self.object.id, 'ca']) + url_es = reverse_lazy('idhub:user_credential_pdf', args=[self.object.id, 'es']) context.update({ 'object': self.object, + 'url_ca': url_ca, + 'url_es': url_es, }) return context class CredentialPdfView(MyWallet, TemplateView): - template_name = "certificates/4_Model_Certificat.html" + template_name = "certificates/{}_{}.html" + template_name = "certificates/{}_{}.html" subtitle = _('Credential management') icon = 'bi bi-patch-check-fill' file_name = "certificate.pdf" @@ -225,6 +230,7 @@ class CredentialPdfView(MyWallet, TemplateView): if not cache.get("KEY_DIDS"): return redirect(reverse_lazy('idhub:user_dashboard')) pk = kwargs['pk'] + lang = kwargs.get('lang', 'ca') self.user = self.request.user self.object = get_object_or_404( VerificableCredential, @@ -232,6 +238,11 @@ class CredentialPdfView(MyWallet, TemplateView): eidas1_did__isnull=False, user=self.request.user ) + self.credential_type = self.object.schema.file_schema.split(".json")[0] + self.template_name = self.template_name.format( + self.credential_type, + lang + ) self.url_id = "{}://{}/public/credentials/{}".format( self.request.scheme, self.request.get_host(), @@ -247,49 +258,52 @@ class CredentialPdfView(MyWallet, TemplateView): response['Content-Disposition'] = 'attachment; filename={}'.format(self.file_name) return response - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - # this_folder = str(Path.cwd()) + def get_img_sign(self): path_img_sig = "idhub/static/images/4_Model_Certificat_html_58d7f7eeb828cf29.jpg" img_signature = next(Path.cwd().glob(path_img_sig)) with open(img_signature, 'rb') as _f: img_sig = base64.b64encode(_f.read()).decode('utf-8') + return img_sig - path_img_head = "idhub/static/images/4_Model_Certificat_html_7a0214c6fc8f2309.jpg" + def get_img_header(self): + path_img_head = "idhub/static/images/4_Model_Certificat_html_7a0214c6fc8f2309.jpg" img_header= next(Path.cwd().glob(path_img_head)) with open(img_header, 'rb') as _f: img_head = base64.b64encode(_f.read()).decode('utf-8') + return img_head + def get_img_footer(self): + path_img_foot = "idhub/static/images/4_Model_Certificat_html_941e7b967953b3f3.jpg" + img_foot= next(Path.cwd().glob(path_img_foot)) + with open(img_foot, 'rb') as _f: + img_foot = base64.b64encode(_f.read()).decode('utf-8') + return img_foot + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + img_sig = self.get_img_sign() + img_head = self.get_img_header() + img_foot = self.get_img_footer() qr = self.generate_qr_code(self.url_id) + issue_date_now = datetime.datetime.now() - first_name = self.user.first_name and self.user.first_name.upper() or "" - last_name = self.user.first_name and self.user.last_name.upper() or "" - document_id = "0000000-L" - course = "COURSE 1" - address = "ADDRESS" - date_course = datetime.datetime.now() - n_hours = 40 - n_lections = 5 - issue_date = datetime.datetime.now() + context.update(dict(self.object.get_datas())) context.update({ 'object': self.object, "image_signature": img_sig, "image_header": img_head, - "first_name": first_name, - "last_name": last_name, - "document_id": document_id, - "course": course, - "address": address, - "date_course": date_course, - "n_hours": n_hours, - "n_lections": n_lections, - "issue_date": issue_date, - "qr": qr + "image_footer": img_foot, + "issue_date_now": issue_date_now.strftime("%d/%m/%Y"), + "qr": qr, }) return context def build_certificate(self): - doc = self.render_to_response(context=self.get_context_data()) + try: + doc = self.render_to_response(context=self.get_context_data()) + except Exception: + self.template_name = "certificates/4_Model_Certificat_ca.html" + doc = self.render_to_response(context=self.get_context_data()) doc.render() pdf = weasyprint.HTML(string=doc.content) return pdf.write_pdf() @@ -340,7 +354,7 @@ class CredentialPdfView(MyWallet, TemplateView): w = IncrementalPdfFileWriter(_buffer) fields.append_signature_field( w, sig_field_spec=fields.SigFieldSpec( - 'Signature', box=(150, 100, 450, 150) + 'Signature', box=(150, 75, 450, 100) ) ) From 91c125e9ebd301a9e94e834d3368ffc4536c07ef Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 14 Mar 2024 22:10:00 +0100 Subject: [PATCH 2/6] clean --- .../certificates/4_Model_Certificat.html | 111 ------------------ 1 file changed, 111 deletions(-) delete mode 100644 idhub/templates/certificates/4_Model_Certificat.html diff --git a/idhub/templates/certificates/4_Model_Certificat.html b/idhub/templates/certificates/4_Model_Certificat.html deleted file mode 100644 index ae29757..0000000 --- a/idhub/templates/certificates/4_Model_Certificat.html +++ /dev/null @@ -1,111 +0,0 @@ -{% load i18n static %} - - - -Certificado - - - - - - - - - -
-
-
- -
-
-
-
- LAFEDE.CAT – ORGANITZACIONS PER A LA JUSTÍCIA GLOBAL
CERTIFICA QUE:
- {{ first_name }} {{ last_name }} amb DNI {{ document_id }}
- Ha realitzat el curs {{ course }}, a {{ address }} / de manera virtual/presencial, els dies {{ date_course }}
- La durada del curs ha estat de {{ n_hours }} hores lectives corresponents a {{ n_lections }} sessions.
-
-
-
- I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issue_date }} -
-
- -
-
- -
-
- -
-
- Pepa Martínez Peyrats
- Directora
- Lafede.cat - Federació d'Organitzacions per a la Justícia Global -
-
- {% if qr %} -
-
- -
-
- {% endif %} -
- - \ No newline at end of file From 844a7c21f330428388837b311cd66e443f9d3eeb Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 15 Mar 2024 11:04:17 +0100 Subject: [PATCH 3/6] add address --- .../excel_examples/federation-membership.xlsx | Bin 8246 -> 8991 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/excel_examples/federation-membership.xlsx b/examples/excel_examples/federation-membership.xlsx index 3d205903e0fb813ba6d90ea7671502d8c3c6ea8a..cfae58c724f14ed61a90a49dbd47b45d5783f530 100644 GIT binary patch delta 7503 zcmZu$Wmp``wnc*502AEZU4v`Tf#B{0g1ZG6ECja!g1eIhcXu0tTOhc*1qt@ZIq%+^ zbKk2U-Tn1fdv|s1y;oJORWF_`i=nCr{{jeujEoF}uH;ySK?4i_e24JBvVhejYy_-}t@-WG@5+>|Nsx1qvU{O6R-vXNGtRqx^s@V{ z>Z%rk$Zq{}nYJ%|50|ryOf*M_S+CNj@T(0e;yp+hE1_$e3S4+d%BfhplLcqa;~6G) zmg8?L^b;?HjfVwh1NLRr?Z7q&&g%FS9>oDq6IaSpga+?j3C7Pz(T3jPLvmtRtAmWa z=ptFd16#9AMJ*B6)nnZ-ocm)B@zuYBZyV_&2j^aZHBhfFgb&xfC)qy7=ybR$4e)-o zP%`d@DtNoP%K7_JO!)1< zVK=sEO0yNRgsu#4yr$u%X;dl?*b#@>6D@lCn9|wTvB%8BRX9~fzuHF?N*YP`iGVVw z_DnGrX~B+QTX^9HS{SWKa)d5uMWgCxDV?;Zu5lSkuKE4XrQ)VYX5ub1SM|U;%L7eH z8etC%@7Awk7ZKJ225+Ip9g~kXt%+6xMIZ(tGlWlgB@=4d?FB28Qu|?wL#-LqA(1AN z#rLqe@m!_og8Bpb0gwk$N9B)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s6>GA`iDG*&L3?L-~kxW~?z zqgHZL9J7g{I^u&r9N&s)_QA}w#cg3}@Q*$UY0Xg&+gMi300LE(mcucd2W<|>bG*ic zw>G)2pD*SRz>efmK31F$bcXa z-&~>(AC9OU#C8u5L~!(Oir*8lWC|@33Euy(p~x2_uJnSJ8)82+T5Hxp)`f1qmCA0L zQ9Mp0H+y?dzH;9hB)W>+*pyYCl!?_dlSe)`u;yqw$axo_Q1Hc?6FOc~#{4xrb1*%6 z%6@5uWx#7iEq`N+<#igf4>O zGJmujuL(vOmjy!)NsI_NJoVR4lcP_$JQudSCb z{#ry+NqwKoThYUh8_)93bMBI@hO#n-Wb1I2;)U9nrtFs;R^J$A4Cwy)1K4S&CA}(mBZ7){y!7z#-Fn3 z9X$e69wUqPFCYjsi2|jh=B9dj{@;xk@xPSt(V))M4F4$oUC=)^Xn)B^ET|L#A#|7; z;~&MpYb%_;)IcCV9OxA_#Xm}aXJgWTDe>Sz)2W!zp5E)9v;d`~A%K@Bf(p=3{)1ed z1_h)%B2FGpyni7NiJ|T^)TmF$r_h0B(GbG-kw6=0D3qSY{i`+ fHxo@SXDe5u|GSn*$WIesJ|4P{JI5f|)7}380FEX# From 09ab17a00fd31a3ed5445955d5de70cfdea35928 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 15 Mar 2024 13:57:32 +0100 Subject: [PATCH 4/6] change some fields of certificates --- .../excel_examples/course-credential.xlsx | Bin 8944 -> 8947 bytes .../excel_examples/federation-membership.xlsx | Bin 8991 -> 9001 bytes .../certificates/course-credential_ca.html | 6 +++--- .../certificates/course-credential_es.html | 6 +++--- .../federation-membership_ca.html | 4 ++-- .../federation-membership_es.html | 4 ++-- idhub/user/views.py | 2 ++ 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/excel_examples/course-credential.xlsx b/examples/excel_examples/course-credential.xlsx index e2216a4e9c5f279c38390b83d905fad00c4a2a3b..70b45169d2e9e7b9832ccbe0a9014dfb0e6211ec 100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ujPJAL|$ChP*ZxWjP-Fwnf4ge;66YXG5^e{xyaWqnZP;fNT=xKO5PGFyF6it zHcv#C7>{|}Nj9d)zGgH6i4yB#5VTBN_-QytZeQPG4t1fem z%LQ~XBqXr?rFvp8kM9CY&@?%QF?fzLDYVXhY>I&V)ZW@5G`GyxUw;o=^}T}{iohr{ zBraq>qlYv!Etjd^`b$j#Vl!bTB~6_c6f&x zZ8S5h*D&mj)BN9s^3rchrVY$IgJ)1Pq4aT)j6nZknKb?UNPLB)V{NfpH9n^0Y+wsU zBB&6mZR2XTt^tj!iNI3!?kJEOibQrC#4}#wtiAo*i!bcfz&#$Q`>^l7*cJEc1X(_p zY>*k^xb}`T^$h^esQ0-RggVRx89pq4AaOIO7qj5Wemn7|ZC&wnXQ4sK+=YJbigsUe zTJ3;Kw4q)BmwlwC5|?30OV-&hxA9~@o$49LX1W469HS=qte~V_ftxJ#IaokBZKC2<7Q^?^9A#kl8GkgDK;J)hQC8^# zW4U;8;d0m3ilofguNJ~%<|Lq4$x*+UAr#^F?EtQ?4HKR|Ho zSDu?86@KneW02ZR97ZZL5sp%0;&s$jCT5@%nK+6vf*s9UGM^(=QdkxFll^`nj^5{Q z3r~#{7GWw&h53O{YL76Isrdb{@ZaVEfR|Jl8pTwcNAm-%sJdu0lM#>D1!^Q3$z&x* P%!T?IEy}8i{3-tz@wpB$ diff --git a/examples/excel_examples/federation-membership.xlsx b/examples/excel_examples/federation-membership.xlsx index cfae58c724f14ed61a90a49dbd47b45d5783f530..7aa9db8f51ef0324ebd3d5e320306297bd67d1c7 100644 GIT binary patch delta 2622 zcmZuzc{J4R7au#>#x}COvoy+hCrid!$THSmNw$Oba|_JM&4g^Nxws`k{QUf& z0nb_?MGnpZ&w34xqrdPXr#2_s&g8!Q3%7Y8+-w^x=*q=LyodpNAE{at4NL_W>wu$Y zstXCwTWYPP0gM6U0#bwicg95dq&AON@gbOF#z!5uXU7H9ct`F1`eH0iSEy%KLPyMU zV`BR3u9`Fzq6_HMrG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532biIo_b`wP*90aO@vmnQ`;Z1%%E+&wUy9Mq#;D<7l9k&zK( zrHJyc1o`yX&D*84){)+HOu0pX1{;si4`;h9>5TFmSxx#5~H+epp zYDAj8g1kHIOzk~slU?*<=`6h8dooqvKk`Z8_sVd_>$|-oxqf>X{BoqL78?{UJkNCE z4m}WDLo0}_o4GvksgTUF0kK{C&a2>>npo>J?Tv4-EQlzXM34O@MsTX?_J5--D&pEM zIs0{%gS}Ah-R=8r_4BEES5Jv^%L~@m&P)qR%6=uLek0o$Fv=c^ei|-Kv8-c0d|hA% zd=AfYDjwGCH7Ln)GZ2?0elDmSpx0q9vCVpfUouwHQ7#cvF)dT_nRvZAp&u=qMg;NSM zqyr`Ga29LnufYn6D51=EqoRtU^e9g%H7e{JHq+9BjMeu9!dJKg=Q>jyPjg+{$tlZh z_plm~0aG8hdO6-qj=p3ADNdzqd*RKVqQdSuIa4MV)gew900`Lc!P){VXdMWQWJN9a>O2qwsOP_b_O zk2$f*1DjL=k&7h)azw=Fcj9=o$=_*j0ak?CvCj? z*X~Ma1c`_QWgny_i0_<`ytzHpzAYTDs!R6yupVV1^0a0tv6qgt@06-vo%4>&Xo(b_ z(zoOe;1&_pVAoo`mu6$>uXEwPP6Lu2DbV+I+(9sb7;rF&HKVDHMx3?Pj zN4P4{oD6u;ZX@uJj%;8*PtqSw{U5O#8+NStE_coSj`2(R#dplbtgpDVh#!m{k;~(y z(^b}(>rT*d{mBk7G zKz~vI017xdA%P3c&-Gvak7gRDErg&I;V#5S7mJG&61qqrFSP3(o(t2?Fa6&`-Eb{J V0 LAFEDE.CAT – ORGANITZACIONS PER A LA JUSTÍCIA GLOBAL
CERTIFICA QUE:

- {{ firstName }} {{ lastName }} amb DNI {{ document_id|default:"falta el dni" }}
- Ha realitzat el curs {{ courseName }}, a {{ address|default:"falta address" }} / de manera {{ modeOfInstruction }}, els dies {{ date_course|default:"falta fecha del curso" }}
+ {{ firstName }} {{ lastName }} amb DNI {{ personalIdentifier }}
+ Ha realitzat el curs {{ courseName }}, a {{ address|default:"" }} / de manera {{ modeOfInstruction }}, els dies {{ issued_date }}
La durada del curs ha estat de {{ courseDuration }} hores lectives corresponents a {{ courseDays }} sessions.



- I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issuedDate }} + I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issued_date }}
diff --git a/idhub/templates/certificates/course-credential_es.html b/idhub/templates/certificates/course-credential_es.html index 32056c6..f97ec3b 100644 --- a/idhub/templates/certificates/course-credential_es.html +++ b/idhub/templates/certificates/course-credential_es.html @@ -77,15 +77,15 @@
LAFEDE.CAT – ORGANIZACIONES PARA LA JUSTÍCIA GLOBAL
CERTIFICA QUE:

- {{ firstName }} {{ lastName }} con DNI {{ document_id|default:"falta el dni" }}
- Ha realizado el curso {{ courseName }}, en {{ address|default:"falta address" }} / de manera {{ modeOfInstruction }}, los días {{ date_course|default:"falta fecha del curso" }}
+ {{ firstName }} {{ lastName }} con DNI {{ personalIdentifier }}
+ Ha realizado el curso {{ courseName }}, en {{ address }} / de manera {{ modeOfInstruction }}, los días {{ issued_date }}
La duración del curso ha sido de {{ courseDuration }} horas lectivas correspondientes a {{ courseDays }} sessiones.



- Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issuedDate }} + Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issued_date }}
diff --git a/idhub/templates/certificates/federation-membership_ca.html b/idhub/templates/certificates/federation-membership_ca.html index 3b83531..472db16 100644 --- a/idhub/templates/certificates/federation-membership_ca.html +++ b/idhub/templates/certificates/federation-membership_ca.html @@ -87,13 +87,13 @@ CERTIFICA
  • - Que l’entitat {{ legalName }}, amb NIF {{ registrationIdentifier }} i domicili a {{ streetAddress }} {{ postCode }} {{ city }} forma part com a entitat membre de {{ federation }} (ple dret/observadora) de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, des de l’Assemblea General Ordinària celebrada el {{ membershipSince }} + Que l’entitat {{ legalName }}, amb NIF {{ taxReference }} i domicili a {{ streetAddress }} {{ postCode }} {{ city }} forma part com a entitat membre de {{ federation }} (ple dret/observadora) de Lafede.cat - Federació d'Organitzacions per a la Justícia Global, des de l’Assemblea General Ordinària celebrada el {{ issue_date }}



- I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issue_date_now }} + I per deixar-ne constància als efectes oportuns, signo el present certificat en data de {{ issue_date }} diff --git a/idhub/templates/certificates/federation-membership_es.html b/idhub/templates/certificates/federation-membership_es.html index ef4a06f..0550ac6 100644 --- a/idhub/templates/certificates/federation-membership_es.html +++ b/idhub/templates/certificates/federation-membership_es.html @@ -87,13 +87,13 @@ CERTIFICA
  • - Que la entidad {{ legalName }}, con NIF {{ registrationIdentifier }} y domicilio {{ streetAddress }} {{ postCode }} {{ city }} forma parte como entidad miembro de {{ federation }} (por el derecho/observadora) de Lafede.cat - Federación de Organizaciones para la Justícia Global, desde la Asamblea General Ordinaria celebrada el {{ membershipSince }} + Que la entidad {{ legalName }}, con NIF {{ taxReference }} y domicilio {{ streetAddress }} {{ postCode }} {{ city }} forma parte como entidad miembro de {{ federation }} (por el derecho/observadora) de Lafede.cat - Federación de Organizaciones para la Justícia Global, desde la Asamblea General Ordinaria celebrada el {{ issue_date }}



- Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issue_date_now }} + Y para dejar constancia a los efectos oportunos, firmo el presente certificado en fecha de {{ issue_date }} diff --git a/idhub/user/views.py b/idhub/user/views.py index 50e0dd3..fb5dd63 100644 --- a/idhub/user/views.py +++ b/idhub/user/views.py @@ -286,6 +286,7 @@ class CredentialPdfView(MyWallet, TemplateView): img_foot = self.get_img_footer() qr = self.generate_qr_code(self.url_id) issue_date_now = datetime.datetime.now() + issue_date = context.get('issuedDate', issue_date_now) context.update(dict(self.object.get_datas())) context.update({ @@ -294,6 +295,7 @@ class CredentialPdfView(MyWallet, TemplateView): "image_header": img_head, "image_footer": img_foot, "issue_date_now": issue_date_now.strftime("%d/%m/%Y"), + "issue_date": issue_date.strftime("%d/%m/%Y"), "qr": qr, }) return context From 674f136342bc2859860103500a17ce18ec3099a5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 15 Mar 2024 14:13:35 +0100 Subject: [PATCH 5/6] send all credential to verifier --- oidc4vp/models.py | 4 ++++ oidc4vp/views.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/oidc4vp/models.py b/oidc4vp/models.py index 35085fd..e6a164a 100644 --- a/oidc4vp/models.py +++ b/oidc4vp/models.py @@ -319,3 +319,7 @@ class OAuth2VPToken(models.Model): "verifiableCredential", [{}] )[-1].get("credentialSubject") return json.dumps(self.user_info, indent=2) + + def get_user_info_all(self): + tk = json.loads(self.vp_token) + return json.dumps(tk, indent=2) diff --git a/oidc4vp/views.py b/oidc4vp/views.py index 851c652..0f60e94 100644 --- a/oidc4vp/views.py +++ b/oidc4vp/views.py @@ -219,7 +219,7 @@ class VerifyView(View): return email_message def get_verification(self): - return self.vp_token.get_user_info() + return self.vp_token.get_user_info_all() class AllowCodeView(View): def get(self, request, *args, **kwargs): From 52175761d6621b9e75546a46845defa1781ddc38 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 15 Mar 2024 19:18:39 +0100 Subject: [PATCH 6/6] fix2 doble http in vc_id --- idhub/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idhub/models.py b/idhub/models.py index 2eae07f..7843d4c 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -704,7 +704,7 @@ class VerificableCredential(models.Model): cred_path = 'public/credentials' sid = self.hash - url_id = "https://{}/{}/{}".format( + url_id = "{}/{}/{}".format( domain, cred_path, sid