<?php
defined('TYPO3_MODE') || die();

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
    'feiplogin',
    'auth',
    \MMK2410\FeIpLogin\Domain\Service\AuthenticationService::class,
    [
        'title' => 'Frontenduser authentication service',
        'description' => 'Authentication visitors as frontend users if IP address is matching.',
        'subtype' => 'getUserFE,authUserFE,getGroupsFE',
        'available' => true,
        'priority' => 50,
        'quality' => 50,
        'os' => '',
        'exec' => '',
        'className' => \MMK2410\FeIpLogin\Domain\Service\AuthenticationService::class,
    ]
);

/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
$signalSlotDispatcher->connect(
    \MMK2410\FeIpLogin\Slot\AddCustomGroupsSlot::class,
    'addCustomGroups'
);