From 608bcb767b56081b68c25a69859b5284c5712216 Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Tue, 8 Jan 2013 15:52:17 +0000 Subject: [PATCH] Bearer token now correctly base64 decoding --- src/Oauth2/Resource/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Oauth2/Resource/Server.php b/src/Oauth2/Resource/Server.php index 64a29d6e..9b45bc41 100644 --- a/src/Oauth2/Resource/Server.php +++ b/src/Oauth2/Resource/Server.php @@ -148,7 +148,7 @@ class Server if (isset($headers['Authorization'])) { - $rawToken = trim(str_replace('Bearer', '', $headers['Authorization'])); + $rawToken = base64_decode(str_replace('Bearer ', '', trim($headers['Authorization']))); if ( ! empty($rawToken)) { $accessToken = $rawToken; @@ -250,4 +250,4 @@ class Server return call_user_func_array(array($this->_db, $method), $params); } -} \ No newline at end of file +}