check user auth

This commit is contained in:
Kenneth Reitz
2011-06-13 13:51:19 -04:00
parent 14126cd636
commit 60db091e1b
+2 -2
View File
@@ -111,8 +111,8 @@ def status_code(code):
return r
def check_basic_authorization():
def check_basic_auth(user, passwd):
"""Checks user authentication using HTTP Basic Auth."""
auth = request.authorization
return auth and auth.username == "httpbin" and auth.password == "secret"
return auth and auth.username == user and auth.password == passwd