Skip to content

Commit

Permalink
Merge pull request #2 from Zicchio/dev_vp_trust
Browse files Browse the repository at this point in the history
wip: patch get connection
  • Loading branch information
elisanp authored Oct 3, 2024
2 parents cf6f2c4 + f5ddeac commit 10cf886
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 10cf886

Please sign in to comment.