我们正在为我们的Intranet使用Cas-Toolbox。
我们通过CAS获取LDAP属性并将其发送到Intranet应用程序:
<bean id="adAttribRepository" class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao"> <property name="baseDN" value="DC=main,DC=cobaltgroup,DC=com"/> <property name="queryTemplate" value="{0}"/> <property name="contextSource" ref="contextSource"/> <property name="ignorePartialResultException" value="yes"/> <property name="usernameAttributeProvider"> <bean class="org.jasig.services.persondir.support.SimpleUsernameAttributeProvider"> <constructor-arg value="sAMAccountName"/> </bean> </property> <property name="resultAttributeMapping"> <map> <!-- Mapping beetween LDAP entry's attributes (key) and Principal"s (value) --> <entry key="cn" value="Name"/> <entry key="mail" value="Email"/> </map> </property> </bean>
我想知道是否有可能获得用户所属的组。 我尝试了AD属性“memberOf”,但它只返回“第一级”的组员资格
例如:
MemberOf只返回groupA
我想得到groupA和groupB
通过以下filter,ldapsearch很容易:
'(member:1.2.840.113556.1.4.1941:=(cn=user1,cn=users,DC=x))'
但是我不知道如何使它与CAS-Toolbox一起工作
预先感谢您的帮助