ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
CDC.php
Go to the documentation of this file.
1<?php
2
9
10
16 private $domain;
17
18
24 private $client;
25
26
33 public function __construct($config, $reserved) {
34 parent::__construct($config, $reserved);
35 assert('is_array($config)');
36
37 if (!isset($config['domain'])) {
38 throw new SimpleSAML_Error_Exception('Missing domain option in cdc:CDC filter.');
39 }
40 $this->domain = (string)$config['domain'];
41
42 $this->client = new sspmod_cdc_Client($this->domain);
43 }
44
45
51 public function process(&$state) {
52 assert('is_array($state)');
53
54 if (!isset($state['Source']['entityid'])) {
55 SimpleSAML\Logger::warning('saml:CDC: Could not find IdP entityID.');
56 return;
57 }
58
59 // Save state and build request
61
62 $returnTo = SimpleSAML\Module::getModuleURL('cdc/resume.php', array('domain' => $this->domain));
63
64 $params = array(
65 'id' => $id,
66 'entityID' => $state['Source']['entityid'],
67 );
68 $this->client->sendRequest($returnTo, 'append', $params);
69 }
70
71}
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
if(!isset($_REQUEST['ReturnTo'])) $returnTo
Definition: authpage.php:16
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 saveState(&$state, $stage, $rawId=false)
Save the state.
Definition: State.php:194
__construct($config, $reserved)
Initialize this filter.
Definition: CDC.php:33
process(&$state)
Redirect to page setting CDC.
Definition: CDC.php:51
if(!array_key_exists('StateId', $_REQUEST)) $id
$params
Definition: disable.php:11