def ldap_login(): form = LDAPLoginForm(request.form) if form.validate_on_submit(): login_user(form.user, remember=True) print("Valid") return redirect('/') else: print("Invalid") return render_template('login.html', form=form)
def ldap_login(): form = LDAPLoginForm(request.form) if form.validate_on_submit(): login_user(form.user, remember=True) print "Valid" return redirect('/') else: print "Invalid" return render_template('login.html', form=form)
def login(): form = LDAPLoginForm() if not form.validate(): flash('Form invalid', 'warning') return redirect(url_for('auth.login')) if User.auth(form.user, request.form['password']): return redirect(request.args.get("next") or url_for(current_app.config['ROOT_ENDPOINT'])) else: return redirect(url_for('auth.login'))
def login(): form = LDAPLoginForm() if not form.validate(): flash('Form invalid', 'warning') return redirect(url_for('auth.login')) if User.auth(form.user, request.form['password']): return redirect( session.get("next_url") or url_for(current_app.config['ROOT_ENDPOINT'])) else: return redirect(url_for('auth.login'))
def login_form(): return render_template('auth/ldap/login.html', form=LDAPLoginForm())