Files @ e049a28fbddc
Branch filter:

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

Dennis Fink
Add new HTTPAuth feature
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.confg['ENNSTATUS_SERVERS'][username]['PASSWORD']

    return None