Skip to content

Commit

Permalink
wip: patch get connection
Browse files Browse the repository at this point in the history
  • Loading branch information
elisanp committed Oct 3, 2024
1 parent 6b5a6c1 commit f5ddeac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyeudiw/vci/jwks_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def _verify_response_issuer(self, exp_issuer: str, response_json: dict) -> None:

def _get_jwk_metadata(self, uri: str) -> dict:
try:
resp = get_http_url(uri, self.httpc_params)
# TODO: sistemare httpc params
resp = get_http_url(uri, {"connection": {"ssl": False}, "session": {"timeout": 6}}, http_async=False)
response: dict = resp[0].json()
return response
except Exception as e:
Expand All @@ -36,7 +37,8 @@ def _get_jwk_metadata(self, uri: str) -> dict:

def _get_jwkset_from_jwkset_uri(self, jwkset_uri: str) -> list[dict]:
try:
resp = get_http_url(jwkset_uri, self.httpc_params)
# TODO: sistemare httpc params
resp = get_http_url(jwkset_uri, {"connection": {"ssl": False}, "session": {"timeout": 6}}, http_async=False)
jwks: dict[Literal["keys"], list[dict]] = resp[0].json()
return jwks.get("keys", [])
except Exception as e:
Expand Down

0 comments on commit f5ddeac

Please sign in to comment.