diff --git a/examples/organizations__instance_localhost-pair.csv b/examples/organizations__instance_localhost-pair.csv new file mode 100644 index 0000000..9f283d2 --- /dev/null +++ b/examples/organizations__instance_localhost-pair.csv @@ -0,0 +1,2 @@ +"localhost idhub1";"http://localhost/oidc4vp/";"localhost" +"localhost idhub2";"http://idhub2/oidc4vp/";"idhub2" diff --git a/oidc4vp/templates/email/verify_email.html b/oidc4vp/templates/email/verify_email.html new file mode 100644 index 0000000..6a5b3b2 --- /dev/null +++ b/oidc4vp/templates/email/verify_email.html @@ -0,0 +1,10 @@ +Hola, hay una nueva verificación en el servicio de verificación Idhub {{ domain }} +
+El código asociado a esta verificación es: {{ code }} +
+estos son los datos de la verificación: +
+{{ verification|safe }} + +
+Muchas gracias diff --git a/oidc4vp/templates/email/verify_email.txt b/oidc4vp/templates/email/verify_email.txt new file mode 100644 index 0000000..b20596c --- /dev/null +++ b/oidc4vp/templates/email/verify_email.txt @@ -0,0 +1,6 @@ +Hola, hay una nueva verificación en el servicio de verificación Idhub {{ domain }} +El código asociado a esta verificación es: {{ code }} +estos son los datos de la verificación: +{{ verification|safe }} + +Muchas gracias diff --git a/oidc4vp/templates/email/verify_subject.txt b/oidc4vp/templates/email/verify_subject.txt new file mode 100644 index 0000000..c7a2a02 --- /dev/null +++ b/oidc4vp/templates/email/verify_subject.txt @@ -0,0 +1 @@ +Nueva verificacion en {{ dominio }} diff --git a/oidc4vp/templates/received_code.html b/oidc4vp/templates/received_code.html new file mode 100644 index 0000000..dc03976 --- /dev/null +++ b/oidc4vp/templates/received_code.html @@ -0,0 +1,72 @@ + +{% load i18n static %} + + + + + + + + + + {% block title %}{% if title %}{{ title }} – {% endif %}Pangea{% endblock %} + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+ {% trans 'Thank you, we are received your presentation correctly.' %} +
+
+
+
+ +
+
+ +
+
+
+ + diff --git a/oidc4vp/urls.py b/oidc4vp/urls.py index d7b79be..ccef7af 100644 --- a/oidc4vp/urls.py +++ b/oidc4vp/urls.py @@ -13,4 +13,6 @@ urlpatterns = [ name="authorize"), path('allow_code', views.AllowCodeView.as_view(), name="allow_code"), + path('received_code', views.ReceivedCodeView.as_view(), + name="received_code"), ] diff --git a/oidc4vp/views.py b/oidc4vp/views.py index 359a638..851c652 100644 --- a/oidc4vp/views.py +++ b/oidc4vp/views.py @@ -235,7 +235,17 @@ class AllowCodeView(View): promotion = self.authorization.promotions.first() if not promotion: - raise Http404("Page not Found!") + return redirect(reverse_lazy('oidc4vp:received_code')) return redirect(promotion.get_url(code)) + +class ReceivedCodeView(View): + template_name = "received_code.html" + + def get(self, request, *args, **kwargs): + self.context = {} + template = loader.get_template( + self.template_name, + ).render() + return HttpResponse(template)