Add configurable http auth realm and optional realm specification in http_auth_required decorator

This commit is contained in:
Matt Wright
2012-07-12 14:16:54 -04:00
parent a2d31d1d8d
commit dcdfb4d3e7
4 changed files with 51 additions and 11 deletions
+5
View File
@@ -78,6 +78,11 @@ def create_app(auth_config):
def http():
return render_template('index.html', content='HTTP Authentication')
@app.route('/http_custom_realm')
@http_auth_required('My Realm')
def http_custom_realm():
return render_template('index.html', content='HTTP Authentication')
@app.route('/token')
@auth_token_required
def token():