mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-16 16:01:35 +00:00
Merge pull request #10501 from jingzhaoyang/dev
fix: when request access_token is post method, http body has no json …
This commit is contained in:
commit
e40d65871b
@ -104,6 +104,9 @@ class OAuth2Backend(JMSModelBackend):
|
||||
headers = {
|
||||
'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)
|
||||
try:
|
||||
access_token_response.raise_for_status()
|
||||
|
Loading…
Reference in New Issue
Block a user