view demand

This commit is contained in:
Cayo Puigdefabregas 2023-11-28 10:48:57 +01:00
parent 19e44cf52d
commit a976b5bd16
2 changed files with 27 additions and 16 deletions

12
oidc4vp/urls.py Normal file
View file

@ -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")
]

View file

@ -1,26 +1,25 @@
import json import json
from django.core.mail import send_mail from django.views.generic.edit import View
from django.http import HttpResponse, HttpResponseRedirect
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 oidc4vp.models import Authorization
from django.http import HttpResponse
# class PeopleListView(People, TemplateView): # from django.core.mail import send_mail
# template_name = "idhub/admin/people.html" # from django.http import HttpResponse, HttpResponseRedirect
# subtitle = _('View users')
# icon = 'bi bi-person'
# def get_context_data(self, **kwargs): # from utils.idhub_ssikit import verify_presentation
# context = super().get_context_data(**kwargs) # from oidc4vp.models import VPVerifyRequest
# context.update({ # from django.shortcuts import get_object_or_404
# 'users': User.objects.filter(), # from more_itertools import flatten, unique_everseen
# })
# return context
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): def DemandAuthorizationView(request):