Java CAS 4.2获取LDAP属性
我正在使用下面的配置成功地获取LDAP属性值,并且可以在日志文件中看到这些值Java CAS 4.2获取LDAP属性,java,spring,single-sign-on,cas,Java,Spring,Single Sign On,Cas,我正在使用下面的配置成功地获取LDAP属性值,并且可以在日志文件中看到这些值 <bean id="ldapAuthenticationHandler" class="org.jasig.cas.authentication.LdapAuthenticationHandler" p:principalIdAttribute="sAMAccountName" c:authenticator-ref="authenticat
<bean id="ldapAuthenticationHandler"
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="sAMAccountName"
c:authenticator-ref="authenticator">
<property name="principalAttributeMap">
<map>
<entry key="displayName" value="simpleName" />
<entry key="mail" value="email" />
<entry key="memberOf" value="membership" />
</map>
</property>
</bean>
现在如何将这些属性发送到客户端
这是my deployerConfigContext.xml中的默认属性位置:
<bean id="attributeRepository" class="org.jasig.services.persondir.support.NamedStubPersonAttributeDao"
p:backingMap-ref="attrRepoBackingMap" />
<util:map id="attrRepoBackingMap">
<entry key="uid" value="uid" />
<entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
<entry key="groupMembership" value="groupMembership" />
<entry>
<key><value>memberOf</value></key>
<list>
<value>faculty</value>
<value>staff</value>
<value>org</value>
</list>
</entry>
</util:map>
成员
官能
工作人员
组织机构
有没有办法用principalAttributeMap填充attributeRepository
当我从deployerConfigContext.xml中删除attributeRepository时,它会引发异常
根据本文档,LdapAuthenticationHandler能够独立解析和检索主体属性,而不需要额外的主体解析程序机制。如果是,我们如何将这些属性返回给客户端?根据本文档
如果您确实决定让身份验证处理程序检索属性而不是单独的主冲突解决程序,则需要确保链接的冲突解决程序处于非活动状态:
<util:map id="authenticationHandlersResolvers">
...
<entry key-ref="ldapAuthenticationHandler" value="#{null}" />
</util:map>
...
做了这个改变后,它开始工作了