def _parse_remote_response(self, response):
<EOL>try:<EOL><INDENT>if response.headers["<STR_LIT:Content-Type>"] == '<STR_LIT:application/json>':<EOL><INDENT>logger.debug(<EOL>"<STR_LIT>" % (response.text, self.source))<EOL>try:<EOL><INDENT>return json.loads(response.text)<EOL><DEDENT>except ValueError:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>elif response.headers["<STR_LIT:Content-Type>"] == '<STR_LIT>':<EOL><INDENT>logger.debug(<EOL>"<STR_LIT>" % (response.text, self.source))<EOL>_jws = factory(response.text)<EOL>_resp = _jws.verify_compact(<EOL>response.text, keys=self.verify_keys.get_signing_key())<EOL>return _resp<EOL><DEDENT>else:<EOL><INDENT>logger.error('<STR_LIT>'.format(<EOL>response.headers['<STR_LIT:Content-Type>']))<EOL>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>
Parse simple JWKS or signed JWKS from the HTTP response.

:param response: HTTP response from the 'jwks_uri' or 'signed_jwks_uri'
    endpoint
:return: response parsed as JSON or None