ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
discoresp.php
Go to the documentation of this file.
1 <?php
2 
7 if (!array_key_exists('AuthID', $_REQUEST)) {
8  throw new SimpleSAML_Error_BadRequest('Missing AuthID to discovery service response handler');
9 }
10 
11 if (!array_key_exists('idpentityid', $_REQUEST)) {
12  throw new SimpleSAML_Error_BadRequest('Missing idpentityid to discovery service response handler');
13 }
14 $state = SimpleSAML_Auth_State::loadState($_REQUEST['AuthID'], 'saml:sp:sso');
15 
16 // Find authentication source
17 assert(array_key_exists('saml:sp:AuthId', $state));
18 $sourceId = $state['saml:sp:AuthId'];
19 
21 if ($source === null) {
22  throw new Exception('Could not find authentication source with id ' . $sourceId);
23 }
24 if (!($source instanceof sspmod_saml_Auth_Source_SP)) {
25  throw new SimpleSAML_Error_Exception('Source type changed?');
26 }
27 
28 $source->startSSO($_REQUEST['idpentityid'], $state);
$sourceId
Definition: discoresp.php:18
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
Definition: State.php:259
if(!array_key_exists('AuthID', $_REQUEST)) if(!array_key_exists('idpentityid', $_REQUEST)) $state
Handler for response from IdP discovery service.
Definition: discoresp.php:14
$source
Definition: discoresp.php:20
static getById($authId, $type=null)
Retrieve authentication source.
Definition: Source.php:340