From d11faed835d73c73ba8b18fd2c9c9a8ee2f1beb1 Mon Sep 17 00:00:00 2001 From: Marco Palladino Date: Tue, 5 Jun 2012 16:51:25 +0200 Subject: [PATCH] auth --- main/mashape/http/AuthUtil.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main/mashape/http/AuthUtil.php b/main/mashape/http/AuthUtil.php index 3b6a928..a18358b 100755 --- a/main/mashape/http/AuthUtil.php +++ b/main/mashape/http/AuthUtil.php @@ -29,9 +29,8 @@ class AuthUtil { public static function generateAuthenticationHeader($publicKey, $privateKey) { $header = ""; if (!($publicKey == null || $privateKey == null)) { - $uuid = uniqid(); - $hash = hash_hmac("sha1", $uuid, $privateKey); - $header = "X-Mashape-Authorization: " . base64_encode($publicKey . ":" . $hash . $uuid) . "\r\n"; + $hash = hash_hmac("sha1", $publicKey, $privateKey); + $header = "Proxy-Authorization: " . base64_encode($publicKey . ":" . $hash) . "\r\n"; } return $header; }