1
我有CAS 3.5服務器,並根據此鏈接已修改deployerConfigContext.xml和casServiceValidationSuccess.jsp =>LINK。在CAS調試日誌中,我可以看到附加屬性映射正在創建,並且屬性值也被記錄。CAS 3.5不返回附加屬性
2012-10-21 18:29:34,556 DEBUG [org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler] - <Performing LDAP bind with credential: [email protected],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: [email protected]]>
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 [[email protected]]>
2012-10-21 18:29:34,562 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Created seed map='{username=[[email protected]]}' for uid='[email protected]'>
2012-10-21 18:29:34,564 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Adding attribute 'cn' with value '[[email protected]]' to query builder 'null'>
2012-10-21 18:29:34,565 DEBUG [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao] - <Generated query builder '([email protected])' from query Map {username=[[email protected]]}.>
2012-10-21 18:29:34,678 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Resolved principal [email protected]>
2012-10-21 18:29:34,678 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Principal found: [email protected]>
2012-10-21 18:29:34,681 DEBUG [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Attribute map for [email protected]: {[email protected], 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客戶端訪問「attributes」數組時,它返回一個空數組。
<?php print_r(phpCAS::getAttributes());?>
給出一個空白數組。如果我硬編碼casServiceValidationSuccess.jsp中的任何東西,它會顯示數組中的屬性,但值爲空。
<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>
...
...
我是否缺少任何東西?
任何想法的人? –
我在某處讀到服務URL(我試圖用CAS保護的URL)必須在SSL上並且應該有有效的證書,只有這樣,CAS纔會在回調響應中返回屬性映射。是這樣嗎? –