2
我需要在電子郵件域(@ domain.com)經過IdP驗證並在系統重定向到SP之前將其附加到用戶的帳戶。在IdP認證/ SP重定向之前向用戶帳戶追加文本
我使用此頁面幫助,但我無法斷言是否我將在其他文本字符鍵入,或通過引用從LDAP檢索到的另一個屬性:http://simplesamlphp.org/docs/stable/simplesamlphp-authproc
我需要在電子郵件域(@ domain.com)經過IdP驗證並在系統重定向到SP之前將其附加到用戶的帳戶。在IdP認證/ SP重定向之前向用戶帳戶追加文本
我使用此頁面幫助,但我無法斷言是否我將在其他文本字符鍵入,或通過引用從LDAP檢索到的另一個屬性:http://simplesamlphp.org/docs/stable/simplesamlphp-authproc
您必須在元數據應用過濾器/ saml20 -idp-hosted.php
使用PHP filter:
'authproc.idp' => array(
60 => array(
'class' => 'core:PHP',
'code' => '
if (!empty($attributes["uid"])) {
$mail = $attributes["uid"][0] . "@domain.com";
$attributes["mail"] = array($mail);
} //Closing bracket was missing
',
),
),
這個過濾器,例如創建一個 '郵件' 屬性基於一個爲 'uid' 屬性。 請注意,$屬性處的屬性值始終是一個數組。
這也可以在config.php中工作,是嗎? –
是的,如果你把它放在config.php中,過濾器將應用於在metadata/saml20-idp-hosted.php和config/authsources.php上定義的所有SP上定義的IdP 引用:http:///simplesamlphp.org/docs/stable/simplesamlphp-authproc?#section_1 – smartin