TYPO3 CMS  TYPO3_6-2
FrontendLoginHook.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Rsaauth\Hook;
3 
23 
29  public function loginFormHook() {
30  $result = array(0 => '', 1 => '');
31  if (trim($GLOBALS['TYPO3_CONF_VARS']['FE']['loginSecurityLevel']) === 'rsa') {
32  $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
33  if ($backend) {
34  $result[0] = 'return TYPO3FrontendLoginFormRsaEncryption.submitForm(this, TYPO3FrontendLoginFormRsaEncryptionPublicKeyUrl);';
35  $javascriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('rsaauth') . 'resources/';
36  $files = array(
37  'jsbn/jsbn.js',
38  'jsbn/prng4.js',
39  'jsbn/rng.js',
40  'jsbn/rsa.js',
41  'jsbn/base64.js',
42  'FrontendLoginFormRsaEncryption.min.js'
43  );
44  $eIdUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($GLOBALS['TSFE']->absRefPrefix . 'index.php?eID=FrontendLoginRsaPublicKey');
45  $additionalHeader = '<script type="text/javascript">var TYPO3FrontendLoginFormRsaEncryptionPublicKeyUrl = ' . $eIdUrl . ';</script>';
46  foreach ($files as $file) {
47  $additionalHeader .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
48  }
49  $GLOBALS['TSFE']->additionalHeaderData['rsaauth_js'] = $additionalHeader;
50  }
51  }
52  return $result;
53  }
54 
55 }
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]