ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilSimpleSAMLphplIdpDiscovery Class Reference
+ 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 string METADATA_DIRECTORY = 'auth/saml/metadata'
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSimpleSAMLphplIdpDiscovery::__construct ( )

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

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

Member Function Documentation

◆ deleteIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::deleteIdpMetadata ( int  $idpId)

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

71  : void
72  {
73  global $DIC;
74 
75  $fs = $DIC->filesystem()->storage();
76 
77  if ($fs->has($this->getMetadataPath($idpId))) {
78  $fs->delete($this->getMetadataPath($idpId));
79  }
80  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

◆ fetchIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::fetchIdpMetadata ( int  $idpId)

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

58  : string
59  {
60  global $DIC;
61 
62  $fs = $DIC->filesystem()->storage();
63 
64  if (!$fs->has($this->getMetadataPath($idpId))) {
65  return '';
66  }
67 
68  return $fs->read($this->getMetadataPath($idpId));
69  }
global $DIC
Definition: shib_login.php:26
+ 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 39 of file class.ilSimpleSAMLphplIdpDiscovery.php.

39  : array
40  {
41  return $this->getIdPList();
42  }

◆ getMetadataDirectory()

ilSimpleSAMLphplIdpDiscovery::getMetadataDirectory ( )

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

Referenced by getMetadataPath().

34  : string
35  {
36  return self::METADATA_DIRECTORY;
37  }
+ Here is the caller graph for this function:

◆ getMetadataPath()

ilSimpleSAMLphplIdpDiscovery::getMetadataPath ( int  $idpId)
private

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

References getMetadataDirectory().

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

44  : string
45  {
46  return $this->getMetadataDirectory() . '/' . $idpId . '.xml';
47  }
+ 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 49 of file class.ilSimpleSAMLphplIdpDiscovery.php.

References $DIC, and getMetadataPath().

49  : void
50  {
51  global $DIC;
52 
53  $fs = $DIC->filesystem()->storage();
54 
55  $fs->put($this->getMetadataPath($idpId), $metadata);
56  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Field Documentation

◆ METADATA_DIRECTORY

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

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


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