-
Notifications
You must be signed in to change notification settings - Fork 702
Expand file tree
/
Copy path_include.php
More file actions
37 lines (28 loc) · 914 Bytes
/
_include.php
File metadata and controls
37 lines (28 loc) · 914 Bytes
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
34
35
36
37
<?php
declare(strict_types=1);
// Set start-time for debugging purposes
define('SIMPLESAMLPHP_START', hrtime(true));
// initialize the autoloader
require_once(dirname(__FILE__, 2) . '/src/_autoload.php');
use SAML2\Compat\ContainerSingleton;
use SimpleSAML\Compat\SspContainer;
use SimpleSAML\Configuration;
use SimpleSAML\Error;
use SimpleSAML\Utils;
$exceptionHandler = new Error\ExceptionHandler();
set_exception_handler([$exceptionHandler, 'customExceptionHandler']);
$errorHandler = new Error\ErrorHandler();
set_error_handler([$errorHandler, 'customErrorHandler']);
try {
Configuration::getInstance();
} catch (Exception $e) {
throw new Error\CriticalConfigurationError(
$e->getMessage(),
);
}
// set the timezone
$timeUtils = new Utils\Time();
$timeUtils->initTimezone();
// set the SAML2 container
$container = new SspContainer();
ContainerSingleton::setContainer($container);