17 assert(
'isset($state["Attributes"])');
18 assert(
'isset($state["SPMetadata"])');
19 assert(
'isset($state["saml:shire"])');
20 assert(
'array_key_exists("saml:target", $state)');
25 '$metadata[' . var_export(
$spEntityId, TRUE) .
']');
30 $shire = $state[
'saml:shire'];
31 $target = $state[
'saml:target'];
43 'protocol' =>
'saml1',
45 if (isset($state[
'saml:AuthnRequestReceivedAt'])) {
46 $statsData[
'logintime'] = microtime(TRUE) - $state[
'saml:AuthnRequestReceivedAt'];
51 $ar = new \SimpleSAML\XML\Shib13\AuthnResponse();
66 if (isset($_REQUEST[
'cookieTime'])) {
67 $cookieTime = (int)$_REQUEST[
'cookieTime'];
68 if ($cookieTime + 5 >
time()) {
77 if (!isset($_REQUEST[
'providerId'])) {
82 if (!isset($_REQUEST[
'shire'])) {
85 $shire = (
string)$_REQUEST[
'shire'];
87 if (isset($_REQUEST[
'target'])) {
99 foreach (
$spMetadata->getEndpoints(
'AssertionConsumerService') as $ep) {
100 if ($ep[
'Binding'] !==
'urn:oasis:names:tc:SAML:1.0:profiles:browser-post') {
103 if ($ep[
'Location'] !== $shire) {
110 throw new Exception(
'Invalid AssertionConsumerService for SP ' .
111 var_export(
$spEntityId, TRUE) .
': ' . var_export($shire, TRUE));
116 'protocol' =>
'saml1',
119 $sessionLostURL = \SimpleSAML\Utils\HTTP::addURLParameters(
124 'Responder' =>
array(
'sspmod_saml_IdP_SAML1',
'sendResponse'),
127 'saml:shire' => $shire,
129 '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.
Create styles array
The data for the language used.
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.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
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.