diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-04-12 11:32:27 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-04-12 11:32:27 +1200 |
commit | 1a79ef8b6ce280563a9c5b3289ec2ecf4024c6b7 (patch) | |
tree | 6fa02d74fc2c43c2ad8c43ba5d669c54c43d2dc8 /netlib/http_auth.py | |
parent | 2630da7263242411d413b5e4b2c520d29848c918 (diff) | |
parent | e58f76aec1db9cc784a3b73c3050d010bb084968 (diff) | |
download | mitmproxy-1a79ef8b6ce280563a9c5b3289ec2ecf4024c6b7.tar.gz mitmproxy-1a79ef8b6ce280563a9c5b3289ec2ecf4024c6b7.tar.bz2 mitmproxy-1a79ef8b6ce280563a9c5b3289ec2ecf4024c6b7.zip |
Merge branch 'master' of https://github.com/mitmproxy/netlib
Diffstat (limited to 'netlib/http_auth.py')
-rw-r--r-- | netlib/http_auth.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/netlib/http_auth.py b/netlib/http_auth.py index dca6e2f3..296e094c 100644 --- a/netlib/http_auth.py +++ b/netlib/http_auth.py @@ -3,7 +3,7 @@ from argparse import Action, ArgumentTypeError from . import http -class NullProxyAuth(): +class NullProxyAuth(object): """ No proxy auth at all (returns empty challange headers) """ @@ -59,12 +59,12 @@ class BasicProxyAuth(NullProxyAuth): return {self.CHALLENGE_HEADER:'Basic realm="%s"'%self.realm} -class PassMan(): +class PassMan(object): def test(self, username, password_token): return False -class PassManNonAnon: +class PassManNonAnon(PassMan): """ Ensure the user specifies a username, accept any password. """ @@ -74,7 +74,7 @@ class PassManNonAnon: return False -class PassManHtpasswd: +class PassManHtpasswd(PassMan): """ Read usernames and passwords from an htpasswd file """ @@ -89,7 +89,7 @@ class PassManHtpasswd: return bool(self.htpasswd.check_password(username, password_token)) -class PassManSingleUser: +class PassManSingleUser(PassMan): def __init__(self, username, password): self.username, self.password = username, password |