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 2
2
3
3
from .base import AuthenticationBase
4
4
5
- from urllib .parse import urlencode
6
5
7
6
8
7
class PushedAuthorizationRequests (AuthenticationBase ):
@@ -23,14 +22,14 @@ def pushed_authorization_request(
23
22
24
23
See: https://www.rfc-editor.org/rfc/rfc9126.html
25
24
"""
26
- return self .post (
25
+ return self .authenticated_post (
27
26
f"{ self .protocol } ://{ self .domain } /oauth/par" ,
28
- data = urlencode ( {
27
+ data = {
29
28
"client_id" :self .client_id ,
30
29
"client_secret" :self .client_secret ,
31
30
"response_type" : response_type ,
32
31
"redirect_uri" : redirect_uri ,
33
32
** kwargs ,
34
- }) ,
33
+ },
35
34
headers = {"Content-Type" : "application/x-www-form-urlencoded" },
36
35
)
Original file line number Diff line number Diff line change 7
7
from random import randint
8
8
from time import sleep
9
9
from typing import TYPE_CHECKING , Any , Mapping
10
+ from urllib .parse import urlencode
10
11
11
12
import requests
12
13
@@ -155,7 +156,7 @@ def _request(
155
156
if data is None and json is not None and headers :
156
157
content_type = headers .get ("Content-Type" , "" ).lower () # Get Content-Type
157
158
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
159
160
json = None # Prevent JSON from being sent
160
161
161
162
kwargs = {
You can’t perform that action at this time.
0 commit comments