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
예제 #3
0
def load_user(payload):
    user = user_datastore.find_user(id=payload['identity'])
    return user
예제 #4
0
파일: core.py 프로젝트: Space-Cadets/Oberon
def jwt_identity(payload):
    user = user_datastore.find_user(email=payload["identity"])
    return user
예제 #5
0
def load_user(payload):
    user = user_datastore.find_user(id=payload['identity'])
    return user
예제 #6
0
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