public function __construct(ResponseInterface $response, string $issuer, array $keys)
{
- $contentType = $response->getHeader('Content-Type')[0];
+ $contentTypeHeaderValue = $response->getHeader('Content-Type')[0] ?? '';
+ $contentType = strtolower(trim(explode(';', $contentTypeHeaderValue, 2)[0]));
+
if ($contentType === 'application/json') {
$this->claims = json_decode($response->getBody()->getContents(), true);
}