From a976b5bd16669ef72ad6891fab9322e7c7465fc6 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 28 Nov 2023 10:48:57 +0100 Subject: [PATCH] view demand --- oidc4vp/urls.py | 12 ++++++++++++ oidc4vp/views.py | 31 +++++++++++++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 oidc4vp/urls.py diff --git a/oidc4vp/urls.py b/oidc4vp/urls.py new file mode 100644 index 0000000..d06949c --- /dev/null +++ b/oidc4vp/urls.py @@ -0,0 +1,12 @@ +from django.urls import path, reverse_lazy + +from oidc4vp import views + + +app_name = 'oidc4vp' + + +urlpatterns = [ + path('verify/', views.VerifyView.as_view(), + name="verification_portal_verify") +] diff --git a/oidc4vp/views.py b/oidc4vp/views.py index c217114..4a39fba 100644 --- a/oidc4vp/views.py +++ b/oidc4vp/views.py @@ -1,26 +1,25 @@ import json -from django.core.mail import send_mail -from django.http import HttpResponse, HttpResponseRedirect +from django.views.generic.edit import View -from utils.idhub_ssikit import verify_presentation -from .models import VPVerifyRequest -from django.shortcuts import get_object_or_404 -# from more_itertools import flatten, unique_everseen from oidc4vp.models import Authorization +from django.http import HttpResponse -# class PeopleListView(People, TemplateView): -# template_name = "idhub/admin/people.html" -# subtitle = _('View users') -# icon = 'bi bi-person' +# from django.core.mail import send_mail +# from django.http import HttpResponse, HttpResponseRedirect -# def get_context_data(self, **kwargs): -# context = super().get_context_data(**kwargs) -# context.update({ -# 'users': User.objects.filter(), -# }) -# return context +# from utils.idhub_ssikit import verify_presentation +# from oidc4vp.models import VPVerifyRequest +# from django.shortcuts import get_object_or_404 +# from more_itertools import flatten, unique_everseen + + +class VerifyView(View): + def get(self, request, *args, **kwargs): + import pdb; pdb.set_trace() + res = json.dumps({"uri": "http://localhost:10000"}) + return HttpResponse(res) def DemandAuthorizationView(request):