ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilSimpleSAMLphplIdpDiscovery Class Reference

Class ilSimpleSAMLphplIdpDiscovery. More...

+ Inheritance diagram for ilSimpleSAMLphplIdpDiscovery:
+ Collaboration diagram for ilSimpleSAMLphplIdpDiscovery:

Public Member Functions

 __construct ()
 
 getMetadataDirectory ()
 
 getList ()
 This method should return an array of IDPs. More...
 
 storeIdpMetadata (int $idpId, string $metadata)
 
 fetchIdpMetadata (int $idpId)
 
 deleteIdpMetadata (int $idpId)
 

Private Member Functions

 getMetadataPath (int $idpId)
 

Private Attributes

const METADATA_DIRECTORY = 'auth/saml/metadata'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSimpleSAMLphplIdpDiscovery::__construct ( )

Definition at line 29 of file class.ilSimpleSAMLphplIdpDiscovery.php.

30  {
31  $this->config = SimpleSAML\Configuration::getInstance();
32  $this->metadata = SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
33  $this->instance = 'saml';
34  $this->metadataSets = ['saml20-idp-remote'];
35  $this->isPassive = false;
36  }

Member Function Documentation

◆ deleteIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::deleteIdpMetadata ( int  $idpId)

Implements ilSamlIdpDiscovery.

Definition at line 75 of file class.ilSimpleSAMLphplIdpDiscovery.php.

References $DIC, and getMetadataPath().

75  : void
76  {
77  global $DIC;
78 
79  $fs = $DIC->filesystem()->storage();
80 
81  if ($fs->has($this->getMetadataPath($idpId))) {
82  $fs->delete($this->getMetadataPath($idpId));
83  }
84  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ fetchIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::fetchIdpMetadata ( int  $idpId)

Implements ilSamlIdpDiscovery.

Definition at line 62 of file class.ilSimpleSAMLphplIdpDiscovery.php.

References $DIC, and getMetadataPath().

62  : string
63  {
64  global $DIC;
65 
66  $fs = $DIC->filesystem()->storage();
67 
68  if (!$fs->has($this->getMetadataPath($idpId))) {
69  return '';
70  }
71 
72  return $fs->read($this->getMetadataPath($idpId));
73  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ getList()

ilSimpleSAMLphplIdpDiscovery::getList ( )

This method should return an array of IDPs.

Each element should be an array as well, providing at least a value for key 'entityid'.

Returns
list<array{entityid: string}>

Implements ilSamlIdpDiscovery.

Definition at line 43 of file class.ilSimpleSAMLphplIdpDiscovery.php.

43  : array
44  {
45  return $this->getIdPList();
46  }

◆ getMetadataDirectory()

ilSimpleSAMLphplIdpDiscovery::getMetadataDirectory ( )

Definition at line 38 of file class.ilSimpleSAMLphplIdpDiscovery.php.

Referenced by getMetadataPath().

38  : string
39  {
40  return self::METADATA_DIRECTORY;
41  }
+ Here is the caller graph for this function:

◆ getMetadataPath()

ilSimpleSAMLphplIdpDiscovery::getMetadataPath ( int  $idpId)
private

Definition at line 48 of file class.ilSimpleSAMLphplIdpDiscovery.php.

References getMetadataDirectory().

Referenced by deleteIdpMetadata(), fetchIdpMetadata(), and storeIdpMetadata().

48  : string
49  {
50  return $this->getMetadataDirectory() . '/' . $idpId . '.xml';
51  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::storeIdpMetadata ( int  $idpId,
string  $metadata 
)

Implements ilSamlIdpDiscovery.

Definition at line 53 of file class.ilSimpleSAMLphplIdpDiscovery.php.

References $DIC, and getMetadataPath().

53  : void
54  {
55  global $DIC;
56 
57  $fs = $DIC->filesystem()->storage();
58 
59  $fs->put($this->getMetadataPath($idpId), $metadata);
60  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Field Documentation

◆ METADATA_DIRECTORY

const ilSimpleSAMLphplIdpDiscovery::METADATA_DIRECTORY = 'auth/saml/metadata'
private

Definition at line 27 of file class.ilSimpleSAMLphplIdpDiscovery.php.


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