diff --git a/spaceapi/auth.py b/spaceapi/auth.py --- a/spaceapi/auth.py +++ b/spaceapi/auth.py @@ -3,8 +3,9 @@ from flask.ext.httpauth import HTTPDiges httpauth = HTTPDigestAuth() + @httpauth.get_password def get_pw(username): - if username is in current_app.config['HTTP_DIGEST_AUTH_USERS']: + if username in current_app.config['HTTP_DIGEST_AUTH_USERS']: return current_app.config['HTTP_DIGEST_AUTH_USERS'][username] return None