src/KapSecurity/Controller/OAuthController.php
private function setHttpResponse(OAuth2Response $response)
    {
        $httpResponse = $this->getResponse();
        $httpResponse->setStatusCode($response->getStatusCode());

        $headers = $httpResponse->getHeaders();
        $headers->addHeaders($response->getHttpHeaders());
        $headers->addHeaderLine('Content-type', 'application/json');

        $httpResponse->setContent($response->getResponseBody());
        return $httpResponse;
    }
private function setHttpResponse(OAuth2Response $response)
    {
        $httpResponse = $this->getResponse();
        $httpResponse->setStatusCode($response->getStatusCode());

        $headers = $httpResponse->getHeaders();
        $headers->addHeaders($response->getHttpHeaders());
        $headers->addHeaderLine('Content-type', 'application/json');

        $httpResponse->setContent($response->getResponseBody());
        return $httpResponse;
    }
private function setHttpResponse ( OAuth2Response $ response ) { $ httpResponse = $ this -> getResponse ( ) ; $ httpResponse -> setStatusCode ( $ response -> getStatusCode ( ) ) ; $ headers = $ httpResponse -> getHeaders ( ) ; $ headers -> addHeaders ( $ response -> getHttpHeaders ( ) ) ; $ headers -> addHeaderLine ( 'Content-type' , 'application/json' ) ; $ httpResponse -> setContent ( $ response -> getResponseBody ( ) ) ; return $ httpResponse ; }
Convert the OAuth2 response to a \Zend\Http\Response

@param $response OAuth2Response
@return \Zend\Http\Response
Convert the OAuth2 response to a \ Zend \ Http \ Response