Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/peppelinux/spid-cie-oidc int…
Browse files Browse the repository at this point in the history
…o dev
  • Loading branch information
peppelinux committed Mar 23, 2023
2 parents c5a6028 + 8881b2b commit cd55622
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spid_cie_oidc/provider/views/consent_page_view.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
from django.core.paginator import Paginator
import urllib.parse
from urllib.parse import urlparse

from djagger.decorators import schema
from django.contrib.auth import logout
Expand Down Expand Up @@ -95,7 +96,7 @@ def post(self, request, *args, **kwargs):


def oidc_provider_not_consent(request):
redirect_uri = request.GET.get("redirect_uri")
redirect_uri = urlparse(request.GET.get("redirect_uri"))
state = request.GET.get("state", "")
logout(request)
kwargs = dict(
Expand All @@ -105,7 +106,7 @@ def oidc_provider_not_consent(request):
),
state = state
)
url = f'{redirect_uri}?{urllib.parse.urlencode(kwargs)}'
url = f'{redirect_uri.path if redirect_uri.path else "/"}?{urllib.parse.urlencode(kwargs)}'
return HttpResponseRedirect(url)


Expand Down

0 comments on commit cd55622

Please sign in to comment.