13 'eduPersonTargetedID',
14 'eduPersonPrincipalName',
16 'facebook_targetedID',
18 'windowslive_targetedID',
20 'linkedin_targetedID',
48 parent::__construct(
$config, $reserved);
50 assert(
'is_array($config)');
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.');
83 foreach ($this->_candidates as $idCandidate) {
85 if(($this->_add_authority) && (isset($request[
'saml:AuthenticatingAuthority'][0]))) {
86 return ($this->_add_candidate ? $idCandidate.
':' :
'').$attributes[$idCandidate][0] .
'!' . $request[
'saml:AuthenticatingAuthority'][0];
88 return ($this->_add_candidate ? $idCandidate.
':' :
'').$attributes[$idCandidate][0];
96 attributes to identity users: '.implode(
', ', $this->_candidates).
'. Unfortunately not 97 one of them was detected. Please ask your institution administrator to release one of 98 them, or try using another identity provider.');
110 assert(
'is_array($request)');
111 assert(
'array_key_exists("Attributes", $request)');
113 $ID = $this->
addID($request[
'Attributes'], $request);
addID($attributes, $request)
$_add_candidate
Whether to prepend the CandidateID, separated by ':'.
$_id_attribute
The name of the generated ID attribute.
process(&$request)
Apply filter to add or replace attributes.
$_candidates
Which attributes to use as identifiers?
Create styles array
The data for the language used.
$_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.