# HG changeset patch # User Dennis Fink # Date 2015-07-07 19:37:30 # Node ID 436de322df819849f801533d351fe5f723c12dc7 # Parent ed7ffb524bd2190ee37d6afeae01fa0588016538 Add the possibility to specify more users 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