Files @ 01128a59174d
Branch filter:

Location: FVDE/ennstatus/ennstatus/api/auth.py

Dennis Fink
Merge hotfix-update-api
from flask import current_app
from flask.ext.httpauth import HTTPDigestAuth

httpauth = HTTPDigestAuth()


@httpauth.get_password
def get_pw(username):

    if username in current_app.config['ENNSTATUS_SERVERS']:
        return current_app.config['ENNSTATUS_SERVERS'][username]['PASSWORD']

    return None