# HG changeset patch # User Dennis Fink # Date 2015-07-08 23:07:34 # Node ID 4f24db93bdd2cb80ac8c053d6b0f92f15b5b0008 # Parent 1492de7d9826669f06bedbd344d2e24a1c398a62 fix multiple users 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