diff --git a/src/idpyoidc/client/service.py b/src/idpyoidc/client/service.py index 297bbc6b..231d56b0 100644 --- a/src/idpyoidc/client/service.py +++ b/src/idpyoidc/client/service.py @@ -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)