Simplify Cognito test - auto decode JSON
This commit is contained in:
parent
dd556a66c6
commit
655b92a2a4
@ -1379,6 +1379,5 @@ def fetch_public_keys():
|
|||||||
keys_url = "https://cognito-idp.{}.amazonaws.com/{}/.well-known/jwks.json".format(
|
keys_url = "https://cognito-idp.{}.amazonaws.com/{}/.well-known/jwks.json".format(
|
||||||
"us-west-2", "someuserpoolid"
|
"us-west-2", "someuserpoolid"
|
||||||
)
|
)
|
||||||
response = requests.get(keys_url).text
|
response = requests.get(keys_url).json()
|
||||||
my_keys = json.loads(response.decode("utf-8"))["keys"]
|
return response["keys"]
|
||||||
return my_keys
|
|
||||||
|
Loading…
Reference in New Issue
Block a user