src/GuzzleMiddleware.php
private function authenticateRequest(RequestInterface $request, AccessToken $token)
    {
        foreach ($this->provider->getHeaders($token->getToken()) as $name => $value) {
            $request = $request->withHeader($name, $value);
        }

        return $request;
    }
private function authenticateRequest(RequestInterface $request, AccessToken $token)
    {
        foreach ($this->provider->getHeaders($token->getToken()) as $name => $value) {
            $request = $request->withHeader($name, $value);
        }

        return $request;
    }
private function authenticateRequest ( RequestInterface $ request , AccessToken $ token ) { foreach ( $ this -> provider -> getHeaders ( $ token -> getToken ( ) ) as $ name => $ value ) { $ request = $ request -> withHeader ( $ name , $ value ) ; } return $ request ; }
Add authentication to an HTTP request.

@param \Psr\Http\Message\RequestInterface      $request
@param \League\OAuth2\Client\Token\AccessToken $token

@return \Psr\Http\Message\RequestInterface
Add authentication to an HTTP request .