1
我使用这个页面作为参考指南:core:PHP添加自定义属性SimpleSAMLPhp
它的内容适用于已经在我的LDAP存在的属性,但如果我想完全是添加一个新的属性?
我添加了以下两个新的;第一个被重命名为新的东西,而第二个是静态的:
saml20-idp-hosted.php
_____________________
100 => array(
'class' => 'core:PHP',
'code' => '
if (!empty($attributes["blahblahID"])) {
$employeeID = $attributes["blahblahID"][0];
$attributes["employeeID"] = array($employeeID);
}
$attributes["securityKey"] = array("123456");
if (!empty($attributes["displayname"])) {
$displayname = $attributes["displayname"][0];
$attributes["UserName"] = array($displayname);
}
',
),
saml20-sp-remote.php
____________________
$metadata['Corestream'] = array(
'metadata-set' => 'saml20-sp-remote',
'simplesaml.attributes' => true,
'attributes' => array('UserName','employeeID','securityKey'),
.........
请问雇员和securityKey属性自动传递给SP这样?
编辑:
我能够运行一个测试,我得到从属性用户名不存在SP的错误。我做错了什么?
不知何故,我从来没有看到AttributeAdd直到你发布它。谢谢! –