def identity(payload): user_id = payload['identity'] return UserModel.find_by_id(user_id)
def identity(payload): user_id = payload['identity'] #return userid_mapping.get(user_id, None) return UserModel.find_by_id(user_id)