private function setHeaders() { $sb = new SignatureBuilder(); $date = new DateTime("now", new DateTimeZone("GMT")); // Define the Date field using the proper GMT format $this->request->setHeader('Date', $date->format("D, d M Y H:i:s") . " GMT"); // Generate the Auth field value by concatenating the public server access key w/ the private query signature for this request $this->request->setHeader("Authorization", "VWS " . $this->access_key . ":" . $sb->tmsSignature($this->request, $this->secret_key)); }
protected function updateHeaders($request) { // Define the Date and Authentication headers $date = new DateTime("now", new DateTimeZone("GMT")); // Define the Date field using the proper GMT format $request->setHeader('Date', $date->format("D, d M Y H:i:s") . " GMT"); // Generate the Auth field value by concatenating the public server access key w/ the private query signature for this request $request->setHeader("Authorization", "VWS " . $this->accessKey . ":" . $this->signatureBuilder->tmsSignature($request, $this->secretKey)); }