Files @ f66d76e2cd7c
Branch filter:

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

Dennis Fink
Merged 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