suport credentials defined in settings
This commit is contained in:
parent
7d477a079b
commit
222509c72c
|
@ -1,6 +1,7 @@
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.views.generic.edit import View
|
from django.views.generic.edit import View
|
||||||
|
|
||||||
from oidc4vp.models import Authorization, Organization
|
from oidc4vp.models import Authorization, Organization
|
||||||
|
@ -19,8 +20,7 @@ from django.shortcuts import get_object_or_404
|
||||||
class VerifyView(View):
|
class VerifyView(View):
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
org = self.validate(request)
|
org = self.validate(request)
|
||||||
# TODO Not hardcode the list of types of presentation_definition
|
presentation_definition = json.dumps(settings.SUPPORTED_CREDENTIALS)
|
||||||
presentation_definition = json.dumps(['MemberCredential'])
|
|
||||||
authorization = Authorization(
|
authorization = Authorization(
|
||||||
organization=org,
|
organization=org,
|
||||||
presentation_definition=presentation_definition
|
presentation_definition=presentation_definition
|
||||||
|
|
|
@ -187,3 +187,8 @@ USE_L10N = True
|
||||||
AUTH_USER_MODEL = 'idhub_auth.User'
|
AUTH_USER_MODEL = 'idhub_auth.User'
|
||||||
RESPONSE_URI = config('RESPONSE_URI', default="")
|
RESPONSE_URI = config('RESPONSE_URI', default="")
|
||||||
ALLOW_CODE_URI= config('ALLOW_CODE_URI', default="")
|
ALLOW_CODE_URI= config('ALLOW_CODE_URI', default="")
|
||||||
|
SUPPORTED_CREDENTIALS = config(
|
||||||
|
'SUPPORTED_CREDENTIALS',
|
||||||
|
default='[]',
|
||||||
|
cast=literal_eval
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue