Hello, please help me. I cant find documentation about how to caonfigure
LdapTemplate?
I use multiple auth source. an now it looks like:

    <bean id="EXCredentialtoPrincipalResolver"
class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">
        <property name="credentialsToPrincipalResolver">
            <bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"/>
        </property>
        <property name="filter" value="(sAMAccountName=%u)"/>
        <property name="principalAttributeName" value="sAMAccountName"/>
        <property name="searchBase" value="cn=Users,dc=example,dc=lan"/>
        <property name="contextSource" ref="EXcontextSource"/>
        <property name="attributeRepository">
            <ref bean="EXattributeRepository"/>
        </property>
    </bean>
    <bean id="EX-LdapAuthHandler"
class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
        <property name="filter" value="sAMAccountName=%u" />
        <property name="searchBase" value="cn=Users,dc=example,dc=lan" />
        <property name="contextSource" ref="EXcontextSource" />
        <property name="ignorePartialResultException" value="yes" /> <!--
fix because of how AD returns results -->
    </bean>
    <bean id="EXcontextSource"
class="org.springframework.ldap.core.support.LdapContextSource">
        <property name="urls">
            <list>
                <value>ldap://vm1-w2k3.example.lan/</value>

               </list>
        </property>
        <property name="userDn"
value="cn=Administrator,cn=Users,dc=example,dc=lan"/>
        <property name="password" value="secret"/>
        <property name="baseEnvironmentProperties">
            <map>
                <entry>
                    <key>
                        <value>java.naming.security.authentication</value>

                    </key>
                    <value>simple</value>
                </entry>
            </map>
        </property>
    </bean>


for each source. Whether I can to simplify it, maybe with LdapTemplate?

Thank you.
Leonid S. Batizhevsky

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to