diff --git a/backend/src/appointment/controller/apis/fxa_client.py b/backend/src/appointment/controller/apis/fxa_client.py index 972d09026..8b9bb4b18 100644 --- a/backend/src/appointment/controller/apis/fxa_client.py +++ b/backend/src/appointment/controller/apis/fxa_client.py @@ -1,6 +1,7 @@ import json import logging import os +from typing import Dict from requests_oauthlib import OAuth2Session import requests @@ -155,5 +156,7 @@ def logout(self): resp.raise_for_status() return resp - def get_jwk(self): - return requests.get(self.config.jwks_url).json() + def get_jwk(self) -> Dict: + """Retrieve the keys object on the jwks url""" + response = requests.get(self.config.jwks_url).json() + return response.get('keys', [])