2 /***************************************************************
5 * (c) 2008 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.
42 * @author Dmitry Dulepov <dmitry@typo3.org>
46 * Processes eID request.
50 public function main() {
51 // Due to the nature of OpenID (redrections, etc) we need to force user
52 // session fetching if there is no session around. This ensures that
53 // our service is called even if there is no login data in the request.
54 // Inside the service we will process OpenID response and authenticate
56 $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = true
;
58 // Initialize Frontend user
59 tslib_eidtools
::connectDB();
60 tslib_eidtools
::initFeUser();
62 // Redirect to the original location in any case (authenticated or not)
64 header(t3lib_div
::HTTP_STATUS_303
);
65 header('Location: ' . t3lib_div
::locationHeaderUrl(t3lib_div
::GPvar('tx_openid_location')));
70 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['ext/openid/class.tx_openid_eid.php']) {
71 include_once($TYPO3_CONF_VARS[TYPO3_MODE
]['XCLASS']['ext/openid/class.tx_openid_eid.php']);
74 $module = t3lib_div
::makeInstance('tx_openid_eID');
75 /* @var tx_openid_eID $module */