4require_once 
'libs/composer/vendor/autoload.php';
 
    5require_once 
'Services/Saml/interfaces/interface.ilSamlAuth.php';
 
   28    public function __construct($authSourceName, $configurationPath)
 
   35        $sessionHandler = $this->config->getString(
'session.handler', 
false);
 
   36        $storageType = $this->config->getString(
'store.type', 
false);
 
   39            $storageType == 
'phpsession' || $sessionHandler == 
'phpsession' ||
 
   40            (empty($storageType) && empty($sessionHandler))
 
   42            throw new RuntimeException(
'Invalid SimpleSAMLphp session handler: Must not be phpsession');
 
   56        $templateHandler->copy(
'./Services/Saml/lib/config.php.dist', 
'auth/saml/config/config.php', [
 
   57            'DB_PATH' => rtrim($configurationPath, 
'/') . 
'/ssphp.sq3',
 
   58            'SQL_INITIAL_PASSWORD' => 
function () {
 
   59                require_once 
'Services/Password/classes/class.ilPasswordUtils.php';
 
   65        $templateHandler->copy(
'./Services/Saml/lib/authsources.php.dist', 
'auth/saml/config/authsources.php', [
 
   66            'RELAY_STATE' => rtrim(ILIAS_HTTP_PATH, 
'/') . 
'/saml.php',
 
   67            'SP_ENTITY_ID' => rtrim(ILIAS_HTTP_PATH, 
'/') . 
'/Services/Saml/lib/metadata.php' 
   76        return $this->authSource->getAuthSource()->getAuthId();
 
   84        $this->authSource->requireAuth();
 
  125        return $this->authSource->isAuthenticated();
 
  133        return $this->authSource->getAttributes();
 
  144            'ReturnStateParam' => 
'LogoutState',
 
  145            'ReturnStateStage' => 
'ilLogoutState' 
  148        if (strlen($returnUrl) > 0) {
 
  149            $params[
'ReturnTo'] = $returnUrl;
 
  152        $this->authSource->logout(
$params);
 
  168        return $this->authSource->getAuthDataArray();
 
An exception for terminatinating execution or to throw for unit testing.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static setConfigDir($path, $configSet='simplesaml')
Set the directory for configuration files for the given configuration set.
static getSessionFromRequest()
Retrieves the current session.
static getInstance()
Get instance.
static getBytes($length)
Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback.
static set($a_var, $a_val)
Set a value.
Class ilSimpleSAMLphpConfigTemplateHandler.
Class ilSimpleSAMLphpWrapper.
protectResource()
Protect a script resource with a SAML auth.
getAuthDataArray()
@inheritDoc
getIdpDiscovery()
ilSamlIdpDiscovery
__construct($authSourceName, $configurationPath)
ilSimpleSAMLphpWrapper constructor.
initConfigFiles($configurationPath)
Class ilSimpleSAMLphplIdpDiscovery.