예제 #1
0
파일: auth.py 프로젝트: abtoc/ofpp-app-old
def login():
    form = LoginForm()
    if form.validate_on_submit():
        user, checked = User.auth(form.userid.data, form.password.data)
        if checked:
            login_user(user)
            return redirect(request.args.get("next") or url_for("index"))
        flash('ユーザIDまたはパスワードが違います', 'danger')
        return render_template('auth/login.pug', form=form), 401
    return render_template('auth/login.pug', form=form)
예제 #2
0
파일: __init__.py 프로젝트: abtoc/ofpp-app
def verify_pw(username, password):
    user, checked = User.auth(username, password)
    return checked