Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. def authenticate_user(username, password):
  2.     try:
  3.         user = Session.query(User).filter_by(username=username).one()
  4.     except:
  5.         raise InvalidUser('Invalid login information1')"""
  6.    if hash_password(password, user.salt) != user.password:
  7.        raise InvalidUser('Invalid login information')"""
  8.     return user
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement