[TASK] Streamline ext_localconf.php / ext_tables.php of sysexts
[Packages/TYPO3.CMS.git] / typo3 / sysext / rsaauth / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add the service
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService('rsaauth', 'auth', \TYPO3\CMS\Rsaauth\RsaAuthService::class, array(
6 'title' => 'RSA authentication',
7 'description' => 'Authenticates users by using encrypted passwords',
8 'subtype' => 'processLoginDataBE,processLoginDataFE',
9 'available' => TRUE,
10 'priority' => 60,
11 // tx_svauth_sv1 has 50, t3sec_saltedpw has 55. This service must have higher priority!
12 'quality' => 60,
13 // tx_svauth_sv1 has 50. This service must have higher quality!
14 'os' => '',
15 'exec' => '',
16 // Do not put a dependency on openssh here or service loading will fail!
17 'className' => \TYPO3\CMS\Rsaauth\RsaAuthService::class
18 ));
19
20 // Add a hook to the BE login form
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/index.php']['loginFormHook']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\LoginFormHook::class . '->getLoginFormTag';
22 // Add hook for user setup module
23 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->getLoginScripts';
24 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['modifyUserDataBeforeSave']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->decryptPassword';
25 // Add a hook to the FE login form (felogin system extension)
26 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\FrontendLoginHook::class . '->loginFormHook';
27 // Add a hook to show Backend warnings
28 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages']['rsaauth'] = \TYPO3\CMS\Rsaauth\BackendWarnings::class;
29
30 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
31 'BackendLogin::getRsaPublicKey',
32 \TYPO3\CMS\Rsaauth\Backend\AjaxLoginHandler::class . '->getRsaPublicKey',
33 FALSE
34 );
35
36 // eID for FrontendLoginRsaPublicKey
37 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['FrontendLoginRsaPublicKey'] =
38 'EXT:rsaauth/Resources/PHP/FrontendLoginRsaPublicKey.php';
39
40 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Rsaauth\Hook\BackendHookForAjaxLogin::class . '->addRsaJsLibraries';