Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def authenticate_user(username, password):
- try:
- user = Session.query(User).filter_by(username=username).one()
- except:
- raise InvalidUser('Invalid login information1')
- if hash_password(password, user.salt) != user.password:
- raise InvalidUser('Invalid login information')
- return user
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement