TYPO3 CMS  TYPO3_8-7
UserSetupHook.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Rsaauth\Hook;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 
27 {
31  protected $rsaEncryptionDecoder = null;
32 
38  public function decryptPassword(array $parameters)
39  {
40  if ($this->isRsaAvailable()) {
41  // Note: although $parameters is not passed by reference, the 'be_user_data' is a reference
42  $parameters['be_user_data'] = $this->getRsaEncryptionDecoder()->decrypt($parameters['be_user_data']);
43  }
44  }
45 
53  public function getLoginScripts(array $parameters, SetupModuleController $userSetupObject)
54  {
55  $rsaEncryptionEncoder = GeneralUtility::makeInstance(RsaEncryptionEncoder::class);
56  $rsaEncryptionEncoder->enableRsaEncryption(true);
57  return '';
58  }
59 
65  protected function isRsaAvailable()
66  {
67  return trim($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) === 'rsa' && $this->getRsaEncryptionDecoder()->isAvailable();
68  }
69 
73  protected function getRsaEncryptionDecoder()
74  {
75  if ($this->rsaEncryptionDecoder === null) {
76  $this->rsaEncryptionDecoder = GeneralUtility::makeInstance(RsaEncryptionDecoder::class);
77  }
78 
80  }
81 }
static makeInstance($className,... $constructorArguments)
getLoginScripts(array $parameters, SetupModuleController $userSetupObject)
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']