Get the NameID value.
49 {
50
51 if (!isset(
$state[
'Destination'][
'entityid'])) {
53 return null;
54 }
56
57 if (!isset(
$state[
'Source'][
'entityid'])) {
59 return null;
60 }
62
63 if (!isset(
$state[
'Attributes'][$this->attribute]) || count(
$state[
'Attributes'][$this->attribute]) === 0) {
65 'Missing attribute '.var_export($this->attribute, true).
66 ' on user - not generating persistent NameID.'
67 );
68 return null;
69 }
70 if (count(
$state[
'Attributes'][$this->attribute]) > 1) {
72 'More than one value in attribute '.var_export($this->attribute, true).
73 ' on user - not generating persistent NameID.'
74 );
75 return null;
76 }
77 $uid = array_values(
$state[
'Attributes'][$this->attribute]);
78 $uid = $uid[0];
79
80 if (empty($uid)) {
82 'Empty value in attribute '.var_export($this->attribute, true).
83 ' on user - not generating persistent NameID.'
84 );
85 return null;
86 }
87
89
90 $uidData = 'uidhashbase'.$secretSalt;
93 $uidData .= strlen($uid).':'.$uid;
94 $uidData .= $secretSalt;
95
96 return sha1($uidData);
97 }
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
static getSecretSalt()
Retrieve the secret salt.