summaryrefslogtreecommitdiffstats
path: root/bitvend/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitvend/views.py')
-rw-r--r--bitvend/views.py26
1 files changed, 1 insertions, 25 deletions
diff --git a/bitvend/views.py b/bitvend/views.py
index 33eed02..7e424cb 100644
--- a/bitvend/views.py
+++ b/bitvend/views.py
@@ -1,7 +1,6 @@
from flask import Blueprint, render_template, redirect, request, flash, \
url_for, jsonify
from flask import current_app as app
-from flask_login import login_required, current_user, logout_user
import six
import qrcode
@@ -9,10 +8,10 @@ import qrcode.image.svg
from bitvend import dev, proc
from bitvend.models import db, User, Transaction, NoFunds
-from bitvend.auth import try_login, cap_required
from bitvend.forms import TransferForm
from bitvend.graphs import gen_main_graph
+from spaceauth import login_required, current_user, cap_required
bp = Blueprint('bitvend', __name__, template_folder='templates')
@@ -72,29 +71,6 @@ def transfer():
return redirect(url_for('.index'))
-@bp.route('/login')
-def login():
- return render_template('login.html', next=request.args.get('next'))
-
-@bp.route('/login', methods=['POST'])
-def login_submit():
- if try_login(request.form.get('username'), request.form.get('password')):
- flash('Login successful', 'success')
-
- if request.form.get('next'):
- return redirect(request.form.get('next'))
-
- return redirect('/')
-
- flash('Login failed', 'danger')
- return redirect(url_for('.login'))
-
-@bp.route('/logout')
-@login_required
-def logout():
- logout_user()
- return redirect(url_for('.index'))
-
@bp.route('/log')
@login_required
@cap_required('staff')