...
Code Block | ||||
---|---|---|---|---|
| ||||
# Required attributes $attr_gn = 'urn:mace:dir:attribute-def:givenName'; $attr_sn = 'urn:mace:dir:attribute-def:sn'; $attr_mail = 'urn:mace:dir:attribute-def:mail'; # attributes to let through (ARP) $requiredAttributes = array( 'FirstName', 'LastName', 'Email' ); if (isset($attributes) and ($attributes !== FALSE)) { if (!empty($attributes[$attr_mail][0])) { $subjectId = $attributes[$attr_mail][0]; } if (!empty($attributes[$attr_gn])) { $attributes['FirstName'] = $attributes[$attr_gn]; } if (!empty($attributes[$attr_sn])) { $attributes['LastName'] = $attributes[$attr_sn]; } if (!empty($attributes[$attr_mail])) { $attributes['Email'] = $attributes[$attr_mail]; } } # Remove all other attributes foreach ($attributes as $k => $v) { if (!in_array($k, $requiredAttributes)) { unset($attributes[$k]); } } |
When you have configured the service you can logon to the service through SURFconext as follows.