ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
WarnShortSSOInterval.php
Go to the documentation of this file.
1<?php
2
9
18 public function process(&$state) {
19 assert('is_array($state)');
20
21 if (!array_key_exists('PreviousSSOTimestamp', $state)) {
22 /*
23 * No timestamp from the previous SSO to this SP. This is the first
24 * time during this session.
25 */
26 return;
27 }
28
29 $timeDelta = time() - $state['PreviousSSOTimestamp'];
30 if ($timeDelta >= 10) {
31 // At least 10 seconds since last attempt
32 return;
33 }
34
35 if (array_key_exists('Destination', $state)
36 && array_key_exists('entityid', $state['Destination'])) {
37 $entityId = $state['Destination']['entityid'];
38 } else {
39 $entityId = 'UNKNOWN';
40 }
41
42 SimpleSAML\Logger::warning('WarnShortSSOInterval: Only ' . $timeDelta .
43 ' seconds since last SSO for this user from the SP ' .
44 var_export($entityId, TRUE));
45
46 // Save state and redirect
47 $id = SimpleSAML_Auth_State::saveState($state, 'core:short_sso_interval');
48 $url = SimpleSAML\Module::getModuleURL('core/short_sso_interval.php');
50 }
51
52}
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
An exception for terminatinating execution or to throw for unit testing.
static warning($string)
Definition: Logger.php:179
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
Definition: Module.php:303
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
Definition: HTTP.php:962
static saveState(&$state, $stage, $rawId=false)
Save the state.
Definition: State.php:194
process(&$state)
Process a authentication response.
if(!array_key_exists('StateId', $_REQUEST)) $id
if( $source===null) if(!($source instanceof sspmod_saml_Auth_Source_SP)) $entityId
Definition: metadata.php:22
$url