From efcc794c3e7b1adc9adeb1a8f2dcd7d1924f8de3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Dec 2023 19:16:06 +0100 Subject: [PATCH] fix return code as response --- oidc4vp/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oidc4vp/views.py b/oidc4vp/views.py index 3f34bfd..3e6f0f3 100644 --- a/oidc4vp/views.py +++ b/oidc4vp/views.py @@ -110,8 +110,9 @@ class VerifyView(View): vp_token.verifing() response = vp_token.get_response_verify() vp_token.save() - if response["redirect_uri"]: - response["response"] = "Validation Code 255255255" + if not vp_token.authorization.promotions.exists(): + response["redirect_uri"] = "" + response["response"] = "Validation Code {}".format(code) return JsonResponse(response)