2 namespace TYPO3\CMS\Openid
;
4 /***************************************************************
7 * (c) 2008-2013 Dmitry Dulepov <dmitry@typo3.org>
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
27 * This class is the OpenID return script for the TYPO3 Frontend.
29 * @author Dmitry Dulepov <dmitry@typo3.org>
34 * Processes eID request.
38 public function main() {
39 // Due to the nature of OpenID (redrections, etc) we need to force user
40 // session fetching if there is no session around. This ensures that
41 // our service is called even if there is no login data in the request.
42 // Inside the service we will process OpenID response and authenticate
44 $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['FE_fetchUserIfNoSession'] = TRUE
;
45 // Initialize Frontend user
46 \TYPO3\CMS\Frontend\Utility\EidUtility
::initFeUser();
47 // Redirect to the original location in any case (authenticated or not)
49 \TYPO3\CMS\Core\Utility\HttpUtility
::redirect(\TYPO3\CMS\Core\Utility\GeneralUtility
::_GP('tx_openid_location'), \TYPO3\CMS\Core\Utility\HttpUtility
::HTTP_STATUS_303
);