private function getRequestHeaders($url, array $parameters)
    {
        $headers = array();

        if (isset($this->clientId) && isset($this->sharedSecret)) {
            $objectIdentifier = null;
            if ($this->apiVersion === '1.1' && isset($parameters['id'])) {
                $objectIdentifier = $parameters['id'];
            } elseif ($this->apiVersion === '1.0' && isset($parameters['api_id'])) {
                $objectIdentifier = $parameters['api_id'];
            }

            $headers['X-Tulip-Client-ID'] = $this->clientId;
            $headers['X-Tulip-Client-Authentication'] = hash_hmac('sha256', $this->clientId.$url.$objectIdentifier, $this->sharedSecret);
        }

        return $headers;
    }
private function getRequestHeaders($url, array $parameters)
    {
        $headers = array();

        if (isset($this->clientId) && isset($this->sharedSecret)) {
            $objectIdentifier = null;
            if ($this->apiVersion === '1.1' && isset($parameters['id'])) {
                $objectIdentifier = $parameters['id'];
            } elseif ($this->apiVersion === '1.0' && isset($parameters['api_id'])) {
                $objectIdentifier = $parameters['api_id'];
            }

            $headers['X-Tulip-Client-ID'] = $this->clientId;
            $headers['X-Tulip-Client-Authentication'] = hash_hmac('sha256', $this->clientId.$url.$objectIdentifier, $this->sharedSecret);
        }

        return $headers;
    }
private function getRequestHeaders ( $ url , array $ parameters ) { $ headers = array ( ) ; if ( isset ( $ this -> clientId ) && isset ( $ this -> sharedSecret ) ) { $ objectIdentifier = null ; if ( $ this -> apiVersion === '1.1' && isset ( $ parameters [ 'id' ] ) ) { $ objectIdentifier = $ parameters [ 'id' ] ; } elseif ( $ this -> apiVersion === '1.0' && isset ( $ parameters [ 'api_id' ] ) ) { $ objectIdentifier = $ parameters [ 'api_id' ] ; } $ headers [ 'X-Tulip-Client-ID' ] = $ this -> clientId ; $ headers [ 'X-Tulip-Client-Authentication' ] = hash_hmac ( 'sha256' , $ this -> clientId . $ url . $ objectIdentifier , $ this -> sharedSecret ) ; } return $ headers ; }
Returns the request authentication headers when a client ID and shared secret are provided.

@param string $url
@param array  $parameters

@return array
Returns the request authentication headers when a client ID and shared secret are provided .