0

我整个星期都在尝试让 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>

我添加了这个:

 <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 一切都会停止工作。

你能帮助我吗?

4

1 回答 1

0

你应该有一个很棒的千行堆栈跟踪,因为 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>
于 2013-07-10T18:16:18.000 回答