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).
This commit is contained in:
		
							parent
							
								
									306b8774c2
								
							
						
					
					
						commit
						17f7afe12d
					
				| 
						 | 
				
			
			@ -11,7 +11,7 @@ class OidcUserinfoResponse implements ProvidesClaims
 | 
			
		|||
 | 
			
		||||
    public function __construct(ResponseInterface $response, string $issuer, array $keys)
 | 
			
		||||
    {
 | 
			
		||||
        $contentType = $response->getHeader('Content-Type')[0];
 | 
			
		||||
        $contentType = explode(';', $response->getHeader('Content-Type')[0], 2)[0];
 | 
			
		||||
        if ($contentType === 'application/json') {
 | 
			
		||||
            $this->claims = json_decode($response->getBody()->getContents(), true);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue