forked from Combodo/combodo-hybridauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
landing.php
33 lines (28 loc) · 846 Bytes
/
landing.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license https://www.combodo.com/documentation/combodo-software-license.html
*
*/
namespace Combodo\iTop\HybridAuth;
use Combodo\iTop\HybridAuth\HybridAuthLoginExtension;
use IssueLog;
use LoginWebPage;
use MetaModel;
use utils;
/**
* Return from OpenID Provider after a successful login
*/
require_once('../../approot.inc.php');
require_once (APPROOT.'bootstrap.inc.php');
require_once (APPROOT.'application/startup.inc.php');
$oHybridAuthLoginExtension= new HybridAuthLoginExtension();
try{
$sURL = $oHybridAuthLoginExtension->HandleServiceProviderCallback();
// Continue Login FSM
LoginWebPage::HTTPRedirect("$sURL");
} catch(\Exception $e){
//already logged
$oLoginWebPage = new LoginWebPage();
$oLoginWebPage->DisplayLogoutPage(false, $e->getMessage());
}