ILIAS  release_8 Revision v8.23
ilSimpleSAMLphplIdpDiscovery Class Reference

Class ilSimpleSAMLphplIdpDiscovery. More...

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

Public Member Functions

 __construct ()
 ilSimpleSAMLphplIdpDiscovery constructor. More...
 
 getMetadataDirectory ()
 
 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
array
More...
 
 storeIdpMetadata (int $idpId, string $metadata)
 
Parameters
int$idpId
string$metadata
More...
 
 fetchIdpMetadata (int $idpId)
 
Parameters
int$idpId
Returns
string
More...
 
 deleteIdpMetadata (int $idpId)
 
Parameters
int$idpId
More...
 

Private Member Functions

 getMetadataPath (int $idpId)
 

Private Attributes

const METADATA_DIRECTORY = 'auth/saml/metadata'
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSimpleSAMLphplIdpDiscovery::__construct ( )

ilSimpleSAMLphplIdpDiscovery constructor.

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

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

Member Function Documentation

◆ deleteIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::deleteIdpMetadata ( int  $idpId)

Parameters
int$idpId

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

97  : void
98  {
99  global $DIC;
100 
101  $fs = $DIC->filesystem()->storage();
102 
103  if ($fs->has($this->getMetadataPath($idpId))) {
104  $fs->delete($this->getMetadataPath($idpId));
105  }
106  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ fetchIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::fetchIdpMetadata ( int  $idpId)

Parameters
int$idpId
Returns
string

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

81  : string
82  {
83  global $DIC;
84 
85  $fs = $DIC->filesystem()->storage();
86 
87  if (!$fs->has($this->getMetadataPath($idpId))) {
88  return '';
89  }
90 
91  return $fs->read($this->getMetadataPath($idpId));
92  }
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
array

Implements ilSamlIdpDiscovery.

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

52  : array
53  {
54  return $this->getIdPList();
55  }

◆ getMetadataDirectory()

ilSimpleSAMLphplIdpDiscovery::getMetadataDirectory ( )
Returns
string

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

Referenced by getMetadataPath().

44  : string
45  {
46  return self::METADATA_DIRECTORY;
47  }
+ Here is the caller graph for this function:

◆ getMetadataPath()

ilSimpleSAMLphplIdpDiscovery::getMetadataPath ( int  $idpId)
private
Parameters
int$idpId
Returns
string

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

References getMetadataDirectory().

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

61  : string
62  {
63  return $this->getMetadataDirectory() . '/' . $idpId . '.xml';
64  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeIdpMetadata()

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

Parameters
int$idpId
string$metadata

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

69  : void
70  {
71  global $DIC;
72 
73  $fs = $DIC->filesystem()->storage();
74 
75  $fs->put($this->getMetadataPath($idpId), $metadata);
76  }
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: