18 assert(isset($state[
'Attributes']));
19 assert(isset($state[
'SPMetadata']));
20 assert(isset($state[
'saml:shire']));
21 assert(array_key_exists(
'saml:target', $state));
26 '$metadata[' . var_export(
$spEntityId,
true) .
']');
31 $shire = $state[
'saml:shire'];
32 $target = $state[
'saml:target'];
44 'protocol' =>
'saml1',
46 if (isset($state[
'saml:AuthnRequestReceivedAt'])) {
47 $statsData[
'logintime'] = microtime(
true) - $state[
'saml:AuthnRequestReceivedAt'];
52 $ar = new \SimpleSAML\XML\Shib13\AuthnResponse();
67 if (isset($_REQUEST[
'cookieTime'])) {
68 $cookieTime = (int)$_REQUEST[
'cookieTime'];
69 if ($cookieTime + 5 > time()) {
78 if (!isset($_REQUEST[
'providerId'])) {
83 if (!isset($_REQUEST[
'shire'])) {
86 $shire = (string)$_REQUEST[
'shire'];
88 if (isset($_REQUEST[
'target'])) {
100 foreach (
$spMetadata->getEndpoints(
'AssertionConsumerService') as $ep) {
101 if ($ep[
'Binding'] !==
'urn:oasis:names:tc:SAML:1.0:profiles:browser-post') {
104 if ($ep[
'Location'] !== $shire) {
111 throw new Exception(
'Invalid AssertionConsumerService for SP ' .
112 var_export(
$spEntityId,
true) .
': ' . var_export($shire,
true));
117 'protocol' =>
'saml1',
120 $sessionLostURL = \SimpleSAML\Utils\HTTP::addURLParameters(
122 array(
'cookieTime' => time()));
125 'Responder' => array(
'sspmod_saml_IdP_SAML1',
'sendResponse'),
128 'saml:shire' => $shire,
130 'saml:AuthnRequestReceivedAt' => microtime(
true),
handleAuthenticationRequest(array &$state)
Process authentication requests.
const RESTART
The index in the state array which contains the restart URL.
static getByState(array &$state)
Retrieve the IdP "owning" the state.
$metadata['__DYNAMIC:1__']
static receiveAuthnRequest(SimpleSAML_IdP $idp)
Receive an authentication request.
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Attribute-related utility methods.
if(array_key_exists('yes', $_REQUEST)) $attributes
static checkSessionCookie($retryURL=null)
Check for session cookie, and show missing-cookie page if it is missing.
static sendResponse(array $state)
Send a response to the SP.
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static log($event, array $data=array())
Notify about an event.