code: public function createService(ServiceLocatorInterface $serviceLocator)
      {
          $serviceManager = $serviceLocator;
          if ($serviceManager instanceof AbstractPluginManager) {
              $serviceManager = $serviceManager->getServiceLocator();
          }
          /** @var $authService AuthenticationService */
          $authService = $serviceManager->get('AuthModule\AuthenticationService');
          /** @var $sessionManager SessionManager */
          $sessionManager = $serviceManager->get('Zend\Session\SessionManager');
  
          return new InteractiveAuth($authService, $sessionManager);
      }
docs: Create service
  
  @param ServiceLocatorInterface $serviceLocator
  @return AuthenticationService