src/Factory/Mvc/Controller/AuthenticationControllerFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $options ControllerOptionsInterface */
        $options = $services->get(ModuleOptions::class);

        if ($options instanceof FormCommonOptionsInterface) {
            $formOptions = $options->toArray();
        } else {
            $formOptions = [];
        }

        if (!isset($formOptions['use_reset_element'])) {
            $formOptions['use_reset_element'] = true;
        }

        return new AuthenticationController(
            $services->get('DomainServiceManager')->get($options->getUserEntityClass()),
            $options,
            $services->get('FormElementManager')->get(ResetPassword::class, $formOptions)
        );
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $options ControllerOptionsInterface */
        $options = $services->get(ModuleOptions::class);

        if ($options instanceof FormCommonOptionsInterface) {
            $formOptions = $options->toArray();
        } else {
            $formOptions = [];
        }

        if (!isset($formOptions['use_reset_element'])) {
            $formOptions['use_reset_element'] = true;
        }

        return new AuthenticationController(
            $services->get('DomainServiceManager')->get($options->getUserEntityClass()),
            $options,
            $services->get('FormElementManager')->get(ResetPassword::class, $formOptions)
        );
    }
{@inheritDoc}

@return AuthenticationController