ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 

Data Fields

const METADATA_DIRECTORY = 'auth/saml/metadata'
 

Private Member Functions

 getMetadataPath (int $idpId)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSimpleSAMLphplIdpDiscovery::__construct ( )

ilSimpleSAMLphplIdpDiscovery constructor.

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

15  {
16  $this->config = SimpleSAML\Configuration::getInstance();
17  $this->metadata = SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
18  $this->instance = 'saml';
19  $this->metadataSets = ['saml20-idp-remote'];
20  $this->isPassive = false;
21  }

Member Function Documentation

◆ deleteIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::deleteIdpMetadata ( int  $idpId)

Parameters
int$idpId

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

79  : void
80  {
81  global $DIC;
82 
83  $fs = $DIC->filesystem()->storage();
84 
85  if ($fs->has($this->getMetadataPath($idpId))) {
86  $fs->delete($this->getMetadataPath($idpId));
87  }
88  }
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ fetchIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::fetchIdpMetadata ( int  $idpId)

Parameters
int$idpId
Returns
string

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

63  : string
64  {
65  global $DIC;
66 
67  $fs = $DIC->filesystem()->storage();
68 
69  if (!$fs->has($this->getMetadataPath($idpId))) {
70  return '';
71  }
72 
73  return $fs->read($this->getMetadataPath($idpId));
74  }
global $DIC
Definition: goto.php:24
+ 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 34 of file class.ilSimpleSAMLphplIdpDiscovery.php.

34  : array
35  {
36  return $this->getIdPList();
37  }

◆ getMetadataDirectory()

ilSimpleSAMLphplIdpDiscovery::getMetadataDirectory ( )
Returns
string

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

Referenced by getMetadataPath().

26  : string
27  {
28  return self::METADATA_DIRECTORY;
29  }
+ Here is the caller graph for this function:

◆ getMetadataPath()

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

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

References getMetadataDirectory().

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

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

References $DIC, and getMetadataPath().

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

Field Documentation

◆ METADATA_DIRECTORY

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

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


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