ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSamlAuthFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 private const string METADATA_PATH = 'auth/saml/config';
26
30 public function auth(string $authSourceName = 'default-sp'): ilSamlAuth
31 {
32 return new ilSimpleSAMLphpWrapper(
33 $authSourceName,
34 $this->getConfigDirectory()
35 );
36 }
37
41 public function getConfigDirectory(): string
42 {
43 global $DIC;
44
45 $fs = $DIC->filesystem()->storage();
46
47 if (!$fs->hasDir(self::METADATA_PATH)) {
48 $fs->createDir(self::METADATA_PATH);
49 }
50
51 return rtrim(ilFileUtils::getDataDir(), '/') . '/' . self::METADATA_PATH;
52 }
53}
Indicates general problems with the input or output operations.
Definition: IOException.php:28
static getDataDir()
get data directory (outside webspace)
auth(string $authSourceName='default-sp')
global $DIC
Definition: shib_login.php:26