ldap second pass, working state

This commit is contained in:
Matthew Scragg 2015-10-15 15:55:38 -05:00
parent 838eb3cb06
commit e9709b6c8f
6 changed files with 37 additions and 28 deletions

View file

@ -6,7 +6,6 @@ from ..models import BaseUser
from .forms import LoginForm
from itsdangerous import URLSafeSerializer, BadSignature
from hashlib import sha256
import bcrypt
@login_manager.token_loader
@ -88,14 +87,6 @@ class User(Model, BaseUser):
# Password check failed
return False
@staticmethod
def hash_password(password):
return bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt(12))
@staticmethod
def check_password(password, hashed):
return bcrypt.hashpw(password.encode('utf-8'), hashed.encode('utf-8')) == hashed
@classmethod
def logout(cls):
logout_user()