Changeset - 4f24db93bdd2
[Not reviewed]
default
0 1 0
Dennis Fink - 10 years ago 2015-07-08 23:07:34

fix multiple users
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
spaceapi/auth.py
Show inline comments
 
from flask import current_app
 
from flask.ext.httpauth import HTTPDigestAuth
 

	
 
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
0 comments (0 inline, 0 general)