示例#1
0
def csrf_protect():
    if request.method == "POST":
        token = session.pop('_csrf_token', None)
        if not token or token != request.form.get('_csrf_token'):
            abort(403)
def logout():
    session.pop('logged_in', None)
    logout_user()
    return redirect(url_for('login'))
示例#3
0
def logout():
	logout_user()
	session.pop('username')
	return redirect(url_for('login'))
示例#4
0
文件: views.py 项目: payoung/cl-app
def logout():
    session.pop('logged_in', None)
    logout_user()
    return redirect(url_for('login'))
示例#5
0
def csrf_protect():
    if request.method == "POST":
        token = session.pop('_csrf_token', None)
        if not token or token != request.form.get('_csrf_token'):
            abort(403)
示例#6
0
def logout():
    logout_user()
    session.pop('username')
    return redirect(url_for('login'))