Skip to content

Commit

Permalink
Merge pull request #10 from gobiernodigitalmonterrey/openid-connect
Browse files Browse the repository at this point in the history
Fixes #9: 'WSGIRequest' object has no attribute 'get_raw_uri'
  • Loading branch information
mattiagiupponi authored Feb 2, 2024
2 parents 9ebca73 + 46e644f commit 1ae3ab6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions oauth2_provider/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ..settings import oauth2_settings
from ..signals import app_authorized
from .mixins import OAuthLibMixin
from django.http import request as django_http_request


log = logging.getLogger("oauth2_provider")
Expand Down Expand Up @@ -155,10 +156,8 @@ def get(self, request, *args, **kwargs):
# TODO: Cache this!
application = get_application_model().objects.get(client_id=credentials["client_id"])

uri_query = urllib.parse.urlparse(self.request.get_raw_uri()).query
uri_query_params = dict(
urllib.parse.parse_qsl(uri_query, keep_blank_values=True, strict_parsing=False)
)
uri_query = django_http_request.parse_qsl(django_http_request.urlsplit(request.get_full_path()).query)
uri_query_params = dict(uri_query)

kwargs["application"] = application
kwargs["client_id"] = credentials["client_id"]
Expand Down

0 comments on commit 1ae3ab6

Please sign in to comment.