Skip to content

Commit 1be342b

Browse files
committed
Simplified the try/except process.
1 parent e8ab2f9 commit 1be342b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/idpyoidc/client/service.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -662,13 +662,8 @@ def parse_response(
662662
resp.verify(**vargs)
663663
except MissingSigningKey as err:
664664
LOGGER.error(f"Could not find an appropriate key: {err}")
665-
_keyjar = self.upstream_get("attribute", "keyjar")
666-
try:
667-
LOGGER.debug(f"[{self.upstream_get('entity').client_id}] Available keys for"
668-
f" {vargs['iss']}:"
669-
f" {_keyjar.key_summary(vargs['iss'])}")
670-
except IssuerNotFound:
671-
LOGGER.debug(f"Issuer not found in keyjar: {vargs['iss']}")
665+
if vargs["iss"] not in vargs["keyjar"].owners():
666+
LOGGER.debug(f"Issuer {vargs['iss']} not found in keyjar")
672667
raise
673668
except Exception as err:
674669
LOGGER.error("Got exception while verifying response: %s", err)

0 commit comments

Comments
 (0)