ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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);
56  self::sendXMLString($xml);
57  }

◆ run()

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

Definition at line 32 of file Module.php.

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

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  }
const SESSION_CLOSE_USER
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
global $DIC
Definition: shib_login.php:22
static setClosingContext(int $a_context)
set closing context (for statistics)
+ 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.

References $DIC, $http, and $response.

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  }
$response
Definition: xapitoken.php:93
$http
Definition: deliver.php:30
global $DIC
Definition: shib_login.php:22

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