Skip to content

Commit

Permalink
Simplified the try/except process.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohe committed Dec 17, 2023
1 parent e8ab2f9 commit 1be342b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/idpyoidc/client/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,8 @@ def parse_response(
resp.verify(**vargs)
except MissingSigningKey as err:
LOGGER.error(f"Could not find an appropriate key: {err}")
_keyjar = self.upstream_get("attribute", "keyjar")
try:
LOGGER.debug(f"[{self.upstream_get('entity').client_id}] Available keys for"
f" {vargs['iss']}:"
f" {_keyjar.key_summary(vargs['iss'])}")
except IssuerNotFound:
LOGGER.debug(f"Issuer not found in keyjar: {vargs['iss']}")
if vargs["iss"] not in vargs["keyjar"].owners():
LOGGER.debug(f"Issuer {vargs['iss']} not found in keyjar")
raise
except Exception as err:
LOGGER.error("Got exception while verifying response: %s", err)
Expand Down

0 comments on commit 1be342b

Please sign in to comment.