mirror of
https://github.com/sartography/spiffworkflow-backend.git
synced 2025-02-23 21:08:18 +00:00
auth_token should be dictionary, not string
This commit is contained in:
parent
f163de61c2
commit
87f65a6c62
@ -77,11 +77,15 @@ def verify_token(token: Optional[str] = None) -> Dict[str, Optional[Union[str, i
|
|||||||
# redirect to original url, with auth_token?
|
# redirect to original url, with auth_token?
|
||||||
user_info = (
|
user_info = (
|
||||||
AuthenticationService.get_user_info_from_open_id(
|
AuthenticationService.get_user_info_from_open_id(
|
||||||
auth_token
|
auth_token['access_token']
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if not user_info:
|
if not user_info:
|
||||||
raise ae
|
raise ae
|
||||||
|
else:
|
||||||
|
raise ae
|
||||||
|
else:
|
||||||
|
raise ae
|
||||||
else:
|
else:
|
||||||
raise ae
|
raise ae
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -266,5 +266,5 @@ class AuthenticationService:
|
|||||||
request_url = f"{open_id_server_url}/realms/{open_id_realm_name}/protocol/openid-connect/token"
|
request_url = f"{open_id_server_url}/realms/{open_id_realm_name}/protocol/openid-connect/token"
|
||||||
|
|
||||||
response = requests.post(request_url, data=data, headers=headers)
|
response = requests.post(request_url, data=data, headers=headers)
|
||||||
print("get_auth_token_from_refresh_token")
|
auth_token_object: dict = json.loads(response.text)
|
||||||
return response.text
|
return auth_token_object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user