CAS 3.5 サーバーがあり、このリンク => LINKに従って deployerConfigContext.xml と casServiceValidationSuccess.jsp を変更しまし た。CAS デバッグ ログでは、追加の属性マップがそこに作成され、属性値もログに記録されていることがわかります。
2012-10-21 18:29:34,556 DEBUG [org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler] - <Performing LDAP bind with credential: CN=mich@mycomp.com,CN=Users,DC=mygroup,DC=local>
2012-10-21 18:29:34,557 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler successfully authenticated [username: mich@mycomp.com]>
2012-10-21 18:29:34,560 DEBUG [org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver] - <Attempting to resolve a principal...>
2012-10-21 18:29:34,561 DEBUG [org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver] - <Creating SimplePrincipal for [mich@mycomp.com]>
2012-10-21 18:29:34,562 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Created seed map='{username=[mich@mycomp.com]}' for uid='mich@mycomp.com'>
2012-10-21 18:29:34,564 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Adding attribute 'cn' with value '[mich@mycomp.com]' to query builder 'null'>
2012-10-21 18:29:34,565 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Generated query builder '(cn=mich@mycomp.com)' from query Map {username=[mich@mycomp.com]}.>
2012-10-21 18:29:34,678 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Resolved principal mich@mycomp.com>
2012-10-21 18:29:34,678 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Principal found: mich@mycomp.com>
2012-10-21 18:29:34,681 DEBUG [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Attribute map for mich@mycomp.com: {Name=mich@mycomp.com, mem=[CN=WFC,OU=Applications,DC=mygroup,DC=local, CN=User Management,OU=Applications,DC=mygroup,DC=local, CN=Wshop,OU=Applications,DC=mygroup,DC=local], dName=Scott}>
しかし、PHP CAS クライアントから「属性」配列にアクセスすると、空の配列が返されます。
<?php print_r(phpCAS::getAttributes());?>
空の配列を返します。casServiceValidationSuccess.jsp に何かをハード コードすると、配列に属性が表示されますが、値は null です。
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<!-- Begin Ldap Attributes -->
<c:if test="${fn:length(assertion.chainedAuthentications) > 0}">
<cas:attributes>
<cas:mem>${fn:escapeXml(assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.attributes.mem)}</cas:mem>
</cas:attributes>
...
...
私は何かが欠けていますか???