Merge branch 'master' into python2
[wrw.git] / wrw / auth.py
index 4ae292d..bb0e0cd 100644 (file)
@@ -1,5 +1,5 @@
 import binascii, hashlib, threading, time
-import resp
+import resp, proto
 
 class unauthorized(resp.httperror):
     def __init__(self, challenge, message=None, detail=None):
@@ -31,7 +31,7 @@ def parsebasic(req):
     if mech != "basic":
         return None, None
     try:
-        raw = binascii.a2b_base64(data)
+        raw = proto.unb64(data)
     except binascii.Error:
         return None, None
     p = raw.find(":")