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直到你發佈它。謝謝! –