message = $exception->getMessageKey(); return $this->errorResponseFactory->create($error,Response::HTTP_FORBIDDEN); } public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey): ?Response { return null; } public function setUserRepository(ObjectRepository $userRepository): void { $this->userRepository = $userRepository; } }