ILIAS  release_8 Revision v8.24
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...
 
 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 ( )

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.

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

References $DIC, and getMetadataPath().

+ 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.

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 }

References $DIC, and getMetadataPath().

+ 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.

References METADATA_DIRECTORY.

Referenced by getMetadataPath().

+ 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.

61 : string
62 {
63 return $this->getMetadataDirectory() . '/' . $idpId . '.xml';
64 }

References getMetadataDirectory().

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

+ 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.

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

References $DIC, and getMetadataPath().

+ 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.

Referenced by getMetadataDirectory().


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