|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2008-2011 Dmitry Dulepov <dmitry@typo3.org> 00006 * All rights reserved 00007 * 00008 * This script is part of the TYPO3 project. The TYPO3 project is 00009 * free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * The GNU General Public License can be found at 00015 * http://www.gnu.org/copyleft/gpl.html. 00016 * 00017 * This script is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * This copyright notice MUST APPEAR in all copies of the script! 00023 ***************************************************************/ 00024 /** 00025 * [CLASS/FUNCTION INDEX of SCRIPT] 00026 * 00027 * 00028 * 00029 * 44: class tx_openid_eID 00030 * 50: public function main() 00031 * 00032 * TOTAL FUNCTIONS: 1 00033 * (This index is automatically created/updated by the extension "extdeveval") 00034 * 00035 */ 00036 00037 /** 00038 * This class is the OpenID return script for the TYPO3 Frontend. 00039 * 00040 * $Id: class.tx_openid_eid.php 10120 2011-01-18 20:03:36Z ohader $ 00041 * 00042 * @author Dmitry Dulepov <dmitry@typo3.org> 00043 */ 00044 class tx_openid_eID { 00045 /** 00046 * Processes eID request. 00047 * 00048 * @return void 00049 */ 00050 public function main() { 00051 // Due to the nature of OpenID (redrections, etc) we need to force user 00052 // session fetching if there is no session around. This ensures that 00053 // our service is called even if there is no login data in the request. 00054 // Inside the service we will process OpenID response and authenticate 00055 // the user. 00056 $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = true; 00057 00058 // Initialize Frontend user 00059 tslib_eidtools::connectDB(); 00060 tslib_eidtools::initFeUser(); 00061 00062 // Redirect to the original location in any case (authenticated or not) 00063 @ob_end_clean(); 00064 t3lib_utility_Http::redirect(t3lib_div::_GP('tx_openid_location'), t3lib_utility_Http::HTTP_STATUS_303); 00065 } 00066 } 00067 00068 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_eid.php'])) { 00069 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/openid/class.tx_openid_eid.php']); 00070 } 00071 00072 $module = t3lib_div::makeInstance('tx_openid_eID'); 00073 /* @var tx_openid_eID $module */ 00074 $module->main(); 00075 00076 ?>
1.8.0