ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct (array $metadataSets, $instance) | |
Initializes this discovery service. More... | |
handleRequest () | |
Handles a request to this discovery service. More... | |
Protected Member Functions | |
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... | |
Protected Attributes | |
$config | |
$instance | |
$metadata | |
$session | |
$metadataSets | |
$spEntityId | |
$isPassive | |
$setIdPentityID = null | |
$returnIdParam | |
$scopedIDPList = array() | |
$returnURL | |
Definition at line 16 of file IdPDisco.php.
SimpleSAML_XHTML_IdPDisco::__construct | ( | array | $metadataSets, |
$instance | |||
) |
Initializes this discovery service.
The constructor does the parsing of the request. If this is an invalid request, it will throw an exception.
array | $metadataSets | Array with metadata sets we find remote entities in. |
string | $instance | The name of this instance of the discovery service. |
Exception | If the request is invalid. |
Definition at line 116 of file IdPDisco.php.
References $_GET, $instance, $metadataSets, SimpleSAML\Utils\HTTP\checkURLAllowed(), SimpleSAML_Configuration\getInstance(), SimpleSAML_Metadata_MetaDataStorageHandler\getMetadataHandler(), SimpleSAML_Session\getSessionFromRequest(), Sabre\Event\Loop\instance(), and log().
|
protected |
Filter the list of IdPs.
This method returns the IdPs that comply with the following conditions:
array | $list | An associative array containing metadata for the IdPs to apply the filtering to. |
Definition at line 496 of file IdPDisco.php.
References $list, and $metadata.
Referenced by handleRequest().
|
protected |
Retrieve cookie with the given name.
This function will retrieve a cookie with the given name for the current discovery service type.
string | $name | The name of the cookie. |
Definition at line 192 of file IdPDisco.php.
References $_COOKIE, and $name.
Referenced by getPreviousIdP(), and getSavedIdP().
|
protected |
Retrieve a recommended IdP based on the IP address of the client.
Definition at line 344 of file IdPDisco.php.
References $_SERVER, and $idp.
Referenced by getRecommendedIdP().
|
protected |
Retrieve the list of IdPs which are stored in the metadata.
Definition at line 459 of file IdPDisco.php.
Referenced by ilSimpleSAMLphplIdpDiscovery\getList(), sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().
|
protected |
Retrieve the previous IdP the user used.
Definition at line 333 of file IdPDisco.php.
References getCookie(), and validateIdP().
Referenced by getRecommendedIdP(), and getSavedIdP().
|
protected |
Try to determine which IdP the user should most likely use.
This function will first look at the previous IdP the user has chosen. If the user hasn't chosen an IdP before, it will look at the IP address.
Definition at line 365 of file IdPDisco.php.
References $idp, getFromCIDRhint(), getPreviousIdP(), and log().
Referenced by sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().
|
protected |
Retrieve the users saved choice of IdP.
Definition at line 307 of file IdPDisco.php.
References getCookie(), getPreviousIdP(), and log().
Referenced by getTargetIdP().
|
protected |
Return the list of scoped idp.
Definition at line 480 of file IdPDisco.php.
References $scopedIDPList.
Referenced by handleRequest().
|
protected |
Retrieve the users choice of IdP.
This function finds out which IdP the user has manually chosen, if any.
Definition at line 271 of file IdPDisco.php.
References $_GET, $_SERVER, and validateIdP().
Referenced by getTargetIdP().
|
protected |
Determine which IdP the user should go to, if any.
Definition at line 423 of file IdPDisco.php.
References $idp, getSavedIdP(), getSelectedIdP(), log(), saveIdP(), setCookie(), and setPreviousIdP().
SimpleSAML_XHTML_IdPDisco::handleRequest | ( | ) |
Handles a request to this discovery service.
The IdP disco parameters should be set before calling this function.
Definition at line 546 of file IdPDisco.php.
References $returnIdParam, $returnURL, $spEntityId, $t, filterList(), getIdPList(), getRecommendedIdP(), getScopedIDPList(), log(), SimpleSAML\Utils\HTTP\redirectTrustedURL(), and start().
|
protected |
Log a message.
This is an helper function for logging messages. It will prefix the messages with our discovery service type.
string | $message | The message which should be logged. |
Definition at line 176 of file IdPDisco.php.
References $message, SimpleSAML\Logger\info(), and Sabre\Event\Loop\instance().
Referenced by __construct(), getRecommendedIdP(), getSavedIdP(), getTargetIdP(), handleRequest(), setPreviousIdP(), start(), and validateIdP().
|
protected |
Determine whether the choice of IdP should be saved.
Definition at line 403 of file IdPDisco.php.
References $_GET.
Referenced by getTargetIdP().
|
protected |
Save cookie with the given name and value.
This function will save a cookie with the given name and value for the current discovery service type.
string | $name | The name of the cookie. |
string | $value | The value of the cookie. |
Definition at line 212 of file IdPDisco.php.
References $name, PHPMailer\PHPMailer\$params, and SimpleSAML\Utils\HTTP\setCookie().
Referenced by getTargetIdP(), and setPreviousIdP().
|
protected |
Save the current IdP choice to a cookie.
string | $idp | The entityID of the IdP. |
Definition at line 389 of file IdPDisco.php.
References $idp, log(), and setCookie().
Referenced by getTargetIdP().
|
protected |
Check if an IdP is set or if the request is passive, and redirect accordingly.
Definition at line 512 of file IdPDisco.php.
References $idp, log(), and SimpleSAML\Utils\HTTP\redirectTrustedURL().
Referenced by sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().
|
protected |
Validates the given IdP entity id.
Takes a string with the IdP entity id, and returns the entity id if it is valid, or null if not.
string | null | $idp | The entity id we want to validate. This can be null, in which case we will return null. |
Definition at line 238 of file IdPDisco.php.
Referenced by getPreviousIdP(), sspmod_discopower_PowerIdPDisco\getPreviousIdP(), and getSelectedIdP().
|
protected |
Definition at line 24 of file IdPDisco.php.
|
protected |
Definition at line 31 of file IdPDisco.php.
Referenced by sspmod_discopower_PowerIdPDisco\__construct(), and __construct().
|
protected |
Definition at line 71 of file IdPDisco.php.
|
protected |
Definition at line 39 of file IdPDisco.php.
Referenced by filterList(), and ilSimpleSAMLphplIdpDiscovery\storeIdpMetadata().
|
protected |
Definition at line 55 of file IdPDisco.php.
Referenced by __construct().
|
protected |
Definition at line 87 of file IdPDisco.php.
Referenced by sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().
|
protected |
Definition at line 103 of file IdPDisco.php.
Referenced by sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().
|
protected |
Definition at line 96 of file IdPDisco.php.
Referenced by getScopedIDPList().
|
protected |
Definition at line 47 of file IdPDisco.php.
|
protected |
Definition at line 78 of file IdPDisco.php.
|
protected |
Definition at line 63 of file IdPDisco.php.
Referenced by sspmod_discopower_PowerIdPDisco\handleRequest(), and handleRequest().