ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilSamlAuthFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 final class ilSamlAuthFactory
27 {
28  private const METADATA_PATH = 'auth/saml/config';
29 
33  public function auth(string $authSourceName = 'default-sp'): ilSamlAuth
34  {
35  return new ilSimpleSAMLphpWrapper(
36  $authSourceName,
37  $this->getConfigDirectory()
38  );
39  }
40 
44  public function getConfigDirectory(): string
45  {
46  global $DIC;
47 
48  $fs = $DIC->filesystem()->storage();
49 
50  $fs->createDir(self::METADATA_PATH);
51 
52  return rtrim(ilFileUtils::getDataDir(), '/') . '/' . self::METADATA_PATH;
53  }
54 }
global $DIC
Definition: feed.php:28
auth(string $authSourceName='default-sp')
static getDataDir()
get data directory (outside webspace)
Class ilSimpleSAMLphpWrapper.