def load_user(payload): user = user_datastore.find_user(id=payload['user_id']) return user
def authenticate(username, password): user = user_datastore.find_user(email=username) if user and username == user.email and verify_password(password, user.password): return user return None
def load_user(payload): user = user_datastore.find_user(id=payload['identity']) return user
def jwt_identity(payload): user = user_datastore.find_user(email=payload["identity"]) return user
def authenticate(username, password): user = user_datastore.find_user(email=username) if user and username == user.email and verify_password( password, user.password): return user return None