Active directory 如何使用LDAP身份验证设置CAS

Active directory 如何使用LDAP身份验证设置CAS,active-directory,ldap,cas,Active Directory,Ldap,Cas,我整个星期都在努力让LDAP的CAS在tomcat上工作。如果我只是将cas.war文件移动到tomcat的webapps中,它就会运行,但我需要它来检查LDAP中的用户数据 我添加了如下依赖项: <!-- Dependance support LDAP --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>c

我整个星期都在努力让LDAP的CAS在tomcat上工作。如果我只是将cas.war文件移动到tomcat的webapps中,它就会运行,但我需要它来检查LDAP中的用户数据

我添加了如下依赖项:

<!-- Dependance support LDAP -->
        <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>cas-server-support-ldap</artifactId>
        <version>${project.version}</version>
        </dependency>

${project.groupId}
cas服务器支持ldap
${project.version}
我补充说:

 <property name="authenticationHandlers">
                        <list>
<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"
  p:filter="sAMAccountName=%u"
  p:searchBase="cn=Users,dc=mathieu,dc=local"
  p:contextSource-ref="contextSource"
  p:ignorePartialResultException="true" />
                        </list>
                </property>
        </bean>

但一旦我更新了deployerconfigcontext.xml,一切都停止工作


你能帮我吗?

你应该有一个很棒的Spring失败的千行堆栈跟踪。猜猜看,我希望在某个地方会有一个关于找不到“contextSource”bean的微妙提及:


  <bean id="contextSource"
    class="org.springframework.ldap.core.support.LdapContextSource"
    p:url="ldaps://XX" p:userDn="XX" p:password="XX">
    <property name="baseEnvironmentProperties">
      <map>
        <entry key="java.naming.security.authentication" value="simple" />
      </map>
    </property>
  </bean>