2 /***************************************************************
5 * (c) 2008-2011 Dmitry Dulepov <dmitry@typo3.org>
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
25 * [CLASS/FUNCTION INDEX of SCRIPT]
29 * 44: class tx_openid_eID
30 * 50: public function main()
33 * (This index is automatically created/updated by the extension "extdeveval")
38 * This class is the OpenID return script for the TYPO3 Frontend.
40 * @author Dmitry Dulepov <dmitry@typo3.org>
44 * Processes eID request.
48 public function main() {
49 // Due to the nature of OpenID (redrections, etc) we need to force user
50 // session fetching if there is no session around. This ensures that
51 // our service is called even if there is no login data in the request.
52 // Inside the service we will process OpenID response and authenticate
54 $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = true
;
56 // Initialize Frontend user
57 tslib_eidtools
::connectDB();
58 tslib_eidtools
::initFeUser();
60 // Redirect to the original location in any case (authenticated or not)
62 t3lib_utility_Http
::redirect(t3lib_div
::_GP('tx_openid_location'), t3lib_utility_Http
::HTTP_STATUS_303
);
66 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['ext/openid/class.tx_openid_eid.php'])) {
67 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['ext/openid/class.tx_openid_eid.php']);
70 $module = t3lib_div
::makeInstance('tx_openid_eID');
71 /* @var tx_openid_eID $module */