Commit 6fa0ea59 authored by Robbe Van Herck's avatar Robbe Van Herck

Added redirect on 401 Unauthorized

parent f2e0be83
......@@ -13,6 +13,10 @@ def load_user(userid):
return User.query.filter_by(id=userid).first()
def custom_401(_):
return redirect(url_for('login'))
def login():
return zeus_login()
......@@ -23,4 +27,4 @@ def logout():
if 'zeus_token' in session:
session.pop('zeus_token', None)
return redirect(url_for('all_users'))
\ No newline at end of file
return redirect(url_for('all_users'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment