diff --git a/spaceapi/auth.py b/spaceapi/auth.py --- a/spaceapi/auth.py +++ b/spaceapi/auth.py @@ -5,6 +5,6 @@ httpauth = HTTPDigestAuth() @httpauth.get_password def get_pw(username): - if username == current_app.config.get('HTTP_DIGEST_AUTH_USER'): - return current_app.config.get('HTTP_DIGEST_AUTH_PASSWORD') + if username is in current_app.config['HTTP_DIGEST_AUTH_USERS']: + return current_app.config['HTTP_DIGEST_AUTH_USERS'][username] return None