From 149e80f8eb9ee907f62dc4158fa3a0e8f3dc0aed Mon Sep 17 00:00:00 2001 From: Marco Palladino Date: Fri, 6 Apr 2012 12:39:07 -0700 Subject: [PATCH] v1 --- README | 4 ---- main/mashape/http/AuthUtil.php | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 3cf36ac..0000000 --- a/README +++ /dev/null @@ -1,4 +0,0 @@ -Mashape PHP client library v0.4 -Copyright (C) 2011 Mashape, Inc. - -For the documentation, please visit http://www.mashape.com/guide/consume/php diff --git a/main/mashape/http/AuthUtil.php b/main/mashape/http/AuthUtil.php index 646ab37..112a761 100644 --- a/main/mashape/http/AuthUtil.php +++ b/main/mashape/http/AuthUtil.php @@ -27,9 +27,8 @@ class AuthUtil { public static function generateAuthenticationHeader($publicKey, $privateKey) { - $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; }