ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Static.php
Go to the documentation of this file.
1 <?php
2 
13 
14 
18  private $attributes;
19 
20 
27  public function __construct($info, $config) {
28  assert(is_array($info));
29  assert(is_array($config));
30 
31  // Call the parent constructor first, as required by the interface
32  parent::__construct($info, $config);
33 
34 
35  // Parse attributes
36  try {
38  } catch(Exception $e) {
39  throw new Exception('Invalid attributes for authentication source ' .
40  $this->authId . ': ' . $e->getMessage());
41  }
42 
43  }
44 
45 
51  public function authenticate(&$state) {
52  assert(is_array($state));
53 
54  $state['Attributes'] = $this->attributes;
55  }
56 
57 }
static normalizeAttributesArray($attributes)
Validate and normalize an array with attributes.
Definition: Attributes.php:79
$config
Definition: bootstrap.php:15
$attributes
The attributes we return.
Definition: Static.php:18
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
authenticate(&$state)
Log in using static attributes.
Definition: Static.php:51
__construct($info, $config)
Constructor for this authentication source.
Definition: Static.php:27
$info
Definition: index.php:5