10 lines
284 B
Python
10 lines
284 B
Python
from photoapp.types import User
|
|
from photoapp.dbutils import db
|
|
from photoapp.common import pwhash
|
|
|
|
|
|
def validate_password(realm, username, password):
|
|
if db.query(User).filter(User.name == username, User.password == pwhash(password)).first():
|
|
return True
|
|
return False
|