TYPO3 CMS  TYPO3_8-7
ext_localconf.php
Go to the documentation of this file.
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, [
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 hook for user setup module
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->getLoginScripts';
22 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['modifyUserDataBeforeSave']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\UserSetupHook::class . '->decryptPassword';
23 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Rsaauth\RsaEncryptionEncoder::class . '->enableEncryptionFromBackendControllerPostConstructor';
24 // Add a hook to the FE login form (felogin system extension)
25 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['felogin']['loginFormOnSubmitFuncs']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\FrontendLoginHook::class . '->loginFormHook';
26 // Add a hook to show Backend warnings
27 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages']['rsaauth'] = \TYPO3\CMS\Rsaauth\BackendWarnings::class;
28 
29 // eID for FrontendLoginRsaPublicKey
30 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['RsaPublicKeyGenerationController'] = \TYPO3\CMS\Rsaauth\Controller\RsaPublicKeyGenerationController::class . '::processRequest';
31 
32 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect(
33  \TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider::class,
34  \TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider::SIGNAL_getPageRenderer,
35  \TYPO3\CMS\Rsaauth\Slot\UsernamePasswordProviderSlot::class,
36  'getPageRenderer'
37 );
38 
39 // Register automatic decryption in DataHandler
40 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['rsaauth'] = \TYPO3\CMS\Rsaauth\Hook\DecryptionHook::class;
41 
42 // Add own form element
43 $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1436965601] = [
44  'nodeName' => 'rsaInput',
45  'priority' => '70',
46  'class' => \TYPO3\CMS\Rsaauth\Form\Element\RsaInputElement::class,
47 ];
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']