private function resolveObject($loginProperty, array $credentials)
    {
        return $this->om->getRepository($this->modelName)->findOneBy([
            $loginProperty => $credentials[$loginProperty],
        ]);
    }