ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ($idpId, $metadata)
 
Parameters
int$idpId
string$metadata
More...
 
 fetchIdpMetadata ($idpId)
 
Parameters
int$idpId
More...
 
 deleteIdpMetadata ($idpId)
 
Parameters
int$idpId
More...
 
- Public Member Functions inherited from SimpleSAML_XHTML_IdPDisco
 __construct (array $metadataSets, $instance)
 Initializes this discovery service. More...
 
 handleRequest ()
 Handles a request to this discovery service. More...
 

Data Fields

const METADATA_DIRECTORY = 'auth/saml/metadata'
 

Protected Member Functions

 getMetadataPath ($idpId)
 
- Protected Member Functions inherited from SimpleSAML_XHTML_IdPDisco
 log ($message)
 Log a message. More...
 
 getCookie ($name)
 Retrieve cookie with the given name. More...
 
 setCookie ($name, $value)
 Save cookie with the given name and value. More...
 
 validateIdP ($idp)
 Validates the given IdP entity id. More...
 
 getSelectedIdP ()
 Retrieve the users choice of IdP. More...
 
 getSavedIdP ()
 Retrieve the users saved choice of IdP. More...
 
 getPreviousIdP ()
 Retrieve the previous IdP the user used. More...
 
 getFromCIDRhint ()
 Retrieve a recommended IdP based on the IP address of the client. More...
 
 getRecommendedIdP ()
 Try to determine which IdP the user should most likely use. More...
 
 setPreviousIdP ($idp)
 Save the current IdP choice to a cookie. More...
 
 saveIdP ()
 Determine whether the choice of IdP should be saved. More...
 
 getTargetIdP ()
 Determine which IdP the user should go to, if any. More...
 
 getIdPList ()
 Retrieve the list of IdPs which are stored in the metadata. More...
 
 getScopedIDPList ()
 Return the list of scoped idp. More...
 
 filterList ($list)
 Filter the list of IdPs. More...
 
 start ()
 Check if an IdP is set or if the request is passive, and redirect accordingly. More...
 

Additional Inherited Members

- Protected Attributes inherited from SimpleSAML_XHTML_IdPDisco
 $config
 
 $instance
 
 $metadata
 
 $session
 
 $metadataSets
 
 $spEntityId
 
 $isPassive
 
 $setIdPentityID = null
 
 $returnIdParam
 
 $scopedIDPList = array()
 
 $returnURL
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSimpleSAMLphplIdpDiscovery::__construct ( )

ilSimpleSAMLphplIdpDiscovery constructor.

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

References array, SimpleSAML_Configuration\getInstance(), and SimpleSAML_Metadata_MetaDataStorageHandler\getMetadataHandler().

17  {
18  $this->config = SimpleSAML_Configuration::getInstance();
20  $this->instance = 'saml';
21  $this->metadataSets = array('saml20-idp-remote');
22  $this->isPassive = false;
23  }
static getMetadataHandler()
This function retrieves the current instance of the metadata handler.
Create styles array
The data for the language used.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:

Member Function Documentation

◆ deleteIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::deleteIdpMetadata (   $idpId)

Parameters
int$idpId

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

82  {
83  global $DIC;
84 
85  $fs = $DIC->filesystem()->storage();
86 
87  if ($fs->has($this->getMetadataPath($idpId))) {
88  $fs->delete($this->getMetadataPath($idpId));
89  }
90  }
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

◆ fetchIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::fetchIdpMetadata (   $idpId)

Parameters
int$idpId

Implements ilSamlIdpDiscovery.

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

References $DIC, and getMetadataPath().

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

References SimpleSAML_XHTML_IdPDisco\getIdPList().

37  {
38  return $this->getIdPList();
39  }
getIdPList()
Retrieve the list of IdPs which are stored in the metadata.
Definition: IdPDisco.php:459
+ Here is the call graph for this function:

◆ getMetadataDirectory()

ilSimpleSAMLphplIdpDiscovery::getMetadataDirectory ( )
Returns
string

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

Referenced by getMetadataPath().

29  {
30  return self::METADATA_DIRECTORY;
31  }
+ Here is the caller graph for this function:

◆ getMetadataPath()

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

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

References getMetadataDirectory().

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

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

◆ storeIdpMetadata()

ilSimpleSAMLphplIdpDiscovery::storeIdpMetadata (   $idpId,
  $metadata 
)

Parameters
int$idpId
string$metadata

Implements ilSamlIdpDiscovery.

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

References $DIC, SimpleSAML_XHTML_IdPDisco\$metadata, and getMetadataPath().

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

Field Documentation

◆ METADATA_DIRECTORY

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

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


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