Skip to content

Commit 17f7afe

Browse files
author
Wes Biggs
committed
Updates the OIDC userinfo endpoint request to allow for a Content-Type response header with optional parameters, like application/json; charset=utf-8. This was causing an issue when integrating with [node-oidc-provider](https://github.com/panva/node-oidc-provider).
1 parent 306b877 commit 17f7afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Access/Oidc/OidcUserinfoResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class OidcUserinfoResponse implements ProvidesClaims
1111

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

0 commit comments

Comments
 (0)