mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-10 02:28:33 +00:00
fix: when request access_token is post method, http body has no json data
This commit is contained in:
parent
48fca8f0f3
commit
efb31d6f37
@ -104,6 +104,9 @@ class OAuth2Backend(JMSModelBackend):
|
|||||||
headers = {
|
headers = {
|
||||||
'Accept': 'application/json'
|
'Accept': 'application/json'
|
||||||
}
|
}
|
||||||
|
if token_method == 'post':
|
||||||
|
access_token_response = requests_func(access_token_url, headers=headers, json=query_dict)
|
||||||
|
else:
|
||||||
access_token_response = requests_func(access_token_url, headers=headers)
|
access_token_response = requests_func(access_token_url, headers=headers)
|
||||||
try:
|
try:
|
||||||
access_token_response.raise_for_status()
|
access_token_response.raise_for_status()
|
||||||
|
Loading…
Reference in New Issue
Block a user