# Path: app.py



import os
import sys
import flask
import flask
from functools import wraps
from werkzeug.contrib import authdigest
from flask import request, session
from app import app
from functools import wraps
from werkzeug.contrib import authdigest
    authentication.digest
    ~~~~~~~~~~~~~~~~~~~~~

    HTTP Digest Auth
    http://flask.pocoo.org/snippets/31/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))





class FlaskRealmDigestDB(authdigest.RealmDigestDB):
    def requires_auth(self, f):
        @wraps(f)
        def decorated(*args, **kwargs):
            request = flask.request
            if not self.isAuthenticated(request):
                return self.challenge()

            return f(*args, **kwargs)

        return decorated


authDB = FlaskRealmDigestDB('MyAuthRealm')
authDB.add_user('admin', 'test')



# Path: app.py



# Path: authentication/http_digest.py
import os
import sys
import flask
import flask
from functools import wraps
from werkzeug.contrib import authdigest
from flask import request, session
from app import app
from functools import wraps
from werkzeug.contrib import authdigest

    authentication.digest
    ~~~~~~~~~~~~~~~~~~~~~

    HTTP Digest Auth
    http://flask.pocoo.org/snippets/31/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))





class FlaskRealmDigestDB(authdigest.RealmDigestDB):
    def requires_auth(self, f):
        @wraps(f)
        def decorated(*args, **kwargs):
            request = flask.request
            if not self.isAuthenticated(request):
                return self.challenge()

            return f(*args, **kwargs)

        return decorated


authDB = FlaskRealmDigestDB('MyAuthRealm')
authDB.add_user('admin', 'test')



@app.route('/')