ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
20
$source
=
SimpleSAML_Auth_Source::getById
(
$sourceId
);
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
);
SimpleSAML_Error_Exception
Definition:
Exception.php:12
sspmod_saml_Auth_Source_SP
Definition:
SP.php:3
SimpleSAML_Error_BadRequest
Definition:
BadRequest.php:12
$sourceId
$sourceId
Definition:
discoresp.php:18
SimpleSAML_Auth_State\loadState
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
Definition:
State.php:259
$state
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
$source
Definition:
discoresp.php:20
php
SimpleSAML_Auth_Source\getById
static getById($authId, $type=null)
Retrieve authentication source.
Definition:
Source.php:340
Exception
libs
composer
vendor
simplesamlphp
simplesamlphp
modules
saml
www
sp
discoresp.php
Generated on Thu Jan 16 2025 19:01:56 for ILIAS by
1.8.13 (using
Doxyfile
)