1

組み込みサーバーを使用する必要がある

<security:authentication-manager>   
    <security:ldap-authentication-provider  
                user-search-filter="(uid={0})" 
                user-search-base="ou=users"
                group-search-filter="(uniqueMember={0})"
                group-search-base="ou=groups"
                group-role-attribute="cn"
                role-prefix="ROLE_">
    </security:ldap-authentication-provider>
</security:authentication-manager>

<security:ldap-server ldif="classpath:mojo_working.ldif" root="dc=example,dc=com"  />

カスタムポピュレータ用。

そのような

<bean id="ldapAuthProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
    <constructor-arg ref="authenticator"/>
    <constructor-arg ref="populator"/>
</bean> 

<bean id="authenticator" class="org.springframework.security.ldap.authentication.BindAuthenticator">
    <constructor-arg ref="contextSource"/>
    <property name="userDnPatterns">
        <list>
            <value>uid={0},ou=users</value>
        </list>
    </property>
</bean>

この場合、組み込み LDAP サーバーの contextSource になる可能性があるもの。

4

1 に答える 1