From 60db091e1b6d3462c8e7cda194a7f1d194518cae Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 13 Jun 2011 13:51:19 -0400 Subject: [PATCH] check user auth --- httpbin/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpbin/helpers.py b/httpbin/helpers.py index bba8f93..ef146e9 100644 --- a/httpbin/helpers.py +++ b/httpbin/helpers.py @@ -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