ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Saml\Module Class Reference
+ Collaboration diagram for ILIAS\Saml\Module:

Static Public Member Functions

static run ()
 
static metadata ()
 

Static Private Member Functions

static sendXMLString (string $xml_string)
 

Detailed Description

Definition at line 30 of file Module.php.

Member Function Documentation

◆ metadata()

static ILIAS\Saml\Module::metadata ( )
static

Definition at line 46 of file Module.php.

46 : void
47 {
48 $auth = (new ilSamlAuthFactory())->auth();
49 $config = Configuration::getInstance();
50 if ($config->getOptionalBoolean('admin.protectmetadata', false)) {
51 $admin = new Auth();
52 $admin->requireAdmin();
53 }
54
55 $xml = (new Metadata(new DefaultSimpleSamlFactory()))->buildXML($auth);
57 }
static sendXMLString(string $xml_string)
Definition: Module.php:59

References ILIAS\Saml\Module\sendXMLString().

+ Here is the call graph for this function:

◆ run()

static ILIAS\Saml\Module::run ( )
static

Definition at line 32 of file Module.php.

32 : void
33 {
34 (new ilSamlAuthFactory())->auth();
35 if (preg_match('@^/saml/sp/saml2-logout.php/@', $_SERVER['PATH_INFO'])) {
36 global $DIC;
38 $DIC['ilAuthSession']->logout();
39 $DIC['ilAppEventHandler']->raise('components/ILIAS/Authentication', 'afterLogout', [
40 'username' => $DIC->user()->getLogin(),
41 ]);
42 }
43 SimpleSamlModule::process()->send();
44 }
static setClosingContext(int $a_context)
set closing context (for statistics)
const int SESSION_CLOSE_USER
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
global $DIC
Definition: shib_login.php:26

References $_SERVER, $DIC, ilSession\SESSION_CLOSE_USER, and ilSession\setClosingContext().

+ Here is the call graph for this function:

◆ sendXMLString()

static ILIAS\Saml\Module::sendXMLString ( string  $xml_string)
staticprivate

Definition at line 59 of file Module.php.

59 : void
60 {
61 global $DIC;
62 $http = $DIC->http();
63
64 $response = $http->response()
65 ->withHeader('Content-Type', 'application/xml')
66 ->withBody(Streams::ofString($xml_string));
67
68 $http->saveResponse($response);
69 $http->sendResponse();
70 $http->close();
71 }
static ofString(string $string)
Creates a new stream with an initial value.
Definition: Streams.php:41
$http
Definition: deliver.php:30
$response
Definition: xapitoken.php:93

References $DIC, $http, $response, and ILIAS\Filesystem\Stream\Streams\ofString().

Referenced by ILIAS\Saml\Module\metadata().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: