File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
33from .base import AuthenticationBase
44
5- from urllib .parse import urlencode
65
76
87class PushedAuthorizationRequests (AuthenticationBase ):
@@ -23,14 +22,14 @@ def pushed_authorization_request(
2322
2423 See: https://www.rfc-editor.org/rfc/rfc9126.html
2524 """
26- return self .post (
25+ return self .authenticated_post (
2726 f"{ self .protocol } ://{ self .domain } /oauth/par" ,
28- data = urlencode ( {
27+ data = {
2928 "client_id" :self .client_id ,
3029 "client_secret" :self .client_secret ,
3130 "response_type" : response_type ,
3231 "redirect_uri" : redirect_uri ,
3332 ** kwargs ,
34- }) ,
33+ },
3534 headers = {"Content-Type" : "application/x-www-form-urlencoded" },
3635 )
Original file line number Diff line number Diff line change 77from random import randint
88from time import sleep
99from typing import TYPE_CHECKING , Any , Mapping
10+ from urllib .parse import urlencode
1011
1112import requests
1213
@@ -155,7 +156,7 @@ def _request(
155156 if data is None and json is not None and headers :
156157 content_type = headers .get ("Content-Type" , "" ).lower () # Get Content-Type
157158 if "application/x-www-form-urlencoded" in content_type :
158- data = json # Copy JSON data into data
159+ data = urlencode ( json ) # Copy JSON data into data
159160 json = None # Prevent JSON from being sent
160161
161162 kwargs = {
You can’t perform that action at this time.
0 commit comments