public function getResource($identifier)
    {
        /** @var UserEntity $user */
        $user = $this->userManager->findUserByUsername($identifier);
        if (!$user) {
            throw new NotFoundHttpException(
                $this->translator->trans('error.user_not_found', array('%id%' => $identifier))
            );
        }

        return $this->createResourceFromUser($user);
    }