2013-07-08 23 views
0

我一直在試圖讓LDAP在整個星期都在tomcat上工作。如果我只是將cas.war文件移動到tomcat的webapps中,它會運行,但我需要它來檢查LDAP以查找我的用戶數據。如何使用LDAP身份驗證設置CASE

我說依賴是這樣的:

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

你能幫我嗎?

回答

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>