aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/request.py
diff options
context:
space:
mode:
authorxray7224 <jessica@megworld.co.uk>2013-07-11 19:43:00 +0100
committerxray7224 <jessica@megworld.co.uk>2013-07-11 19:43:00 +0100
commit786bbd79e8d77c06a9d86aee00edc4dd3e89d651 (patch)
tree50def81289e6449f9a28a609132b06b6e1bb157a /mediagoblin/tools/request.py
parent2b60a56cbec44f789ee2efe71294979d7784515c (diff)
downloadmediagoblin-786bbd79e8d77c06a9d86aee00edc4dd3e89d651.tar.lz
mediagoblin-786bbd79e8d77c06a9d86aee00edc4dd3e89d651.tar.xz
mediagoblin-786bbd79e8d77c06a9d86aee00edc4dd3e89d651.zip
Cleans up some of the OAuth code
Diffstat (limited to 'mediagoblin/tools/request.py')
-rw-r--r--mediagoblin/tools/request.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mediagoblin/tools/request.py b/mediagoblin/tools/request.py
index 0c0fc557..d4739039 100644
--- a/mediagoblin/tools/request.py
+++ b/mediagoblin/tools/request.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import re
import json
import logging
from mediagoblin.db.models import User
@@ -26,8 +25,6 @@ _log = logging.getLogger(__name__)
form_encoded = "application/x-www-form-urlencoded"
json_encoded = "application/json"
-# Regex for Authorization header
-auth_header_re = re.compile('(\w+)[:=] ?"?(\w+)"?')
def setup_user_in_request(request):
"""
@@ -57,9 +54,3 @@ def decode_request(request):
else:
data = ""
return data
-
-def decode_authorization_header(header):
- """ Decodes a HTTP Authorization Header to python dictionary """
- authorization = header.get("Authorization", "")
- tokens = dict(auth_header_re.findall(authorization))
- return tokens