13 'eduPersonTargetedID',
14 'eduPersonPrincipalName',
16 'facebook_targetedID',
18 'windowslive_targetedID',
19 'linkedin_targetedID',
48 parent::__construct(
$config, $reserved);
52 if (array_key_exists(
'candidates',
$config)) {
53 $this->_candidates =
$config[
'candidates'];
54 if (!is_array($this->_candidates)) {
55 throw new Exception(
'SmartID authproc configuration error: \'candidates\' should be an array.');
59 if (array_key_exists(
'id_attribute',
$config)) {
60 $this->_id_attribute =
$config[
'id_attribute'];
61 if (!is_string($this->_id_attribute)) {
62 throw new Exception(
'SmartID authproc configuration error: \'id_attribute\' should be a string.');
66 if (array_key_exists(
'add_authority',
$config)) {
67 $this->_add_authority =
$config[
'add_authority'];
68 if (!is_bool($this->_add_authority)) {
69 throw new Exception(
'SmartID authproc configuration error: \'add_authority\' should be a boolean.');
73 if (array_key_exists(
'add_candidate',
$config)) {
74 $this->_add_candidate =
$config[
'add_candidate'];
75 if (!is_bool($this->_add_candidate)) {
76 throw new Exception(
'SmartID authproc configuration error: \'add_candidate\' should be a boolean.');
84 foreach ($this->_candidates as $idCandidate) {
86 if (($this->_add_authority) && (isset(
$state[
'saml:AuthenticatingAuthority'][0]))) {
87 return ($this->_add_candidate ? $idCandidate.
':' :
'').$attributes[$idCandidate][0].
'!'.
$state[
'saml:AuthenticatingAuthority'][0];
89 return ($this->_add_candidate ? $idCandidate.
':' :
'').$attributes[$idCandidate][0];
97 attributes to identity users: '.implode(
', ', $this->_candidates).
'. Unfortunately not 98 one of them was detected. Please ask your institution administrator to release one of 99 them, or try using another identity provider.');
112 assert(array_key_exists(
'Attributes',
$request));
addID($attributes, $request)
$_add_candidate
Whether to prepend the CandidateID, separated by ':'.
foreach($paths as $path) $request
$_id_attribute
The name of the generated ID attribute.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
process(&$request)
Apply filter to add or replace attributes.
$_candidates
Which attributes to use as identifiers?
$_add_authority
Whether to append the AuthenticatingAuthority, separated by '!' This only works when SSP is used as a...
__construct($config, $reserved)
$attributes
Attributes which should be added/appended.