mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-20 12:20:47 +08:00
Add configurable http auth realm and optional realm specification in http_auth_required decorator
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user