Galera,
Alguem sabe como autenticar numa pagina atraves do LDAP usando Spring Security?
Tentei algo assim, mas deu erro.
<?xml version="1.0" encoding="UTF-8"?><beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans=“http://www.springframework.org/schema/beans” xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=“http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd”>
<http auto-config="true">
<intercept-url pattern="/*" access="ROLE_USER" />
</http>
<beans:bean id="ldapTemplate"
class="org.springframework.ldap.core.simple.SimpleLdapTemplate">
<beans:constructor-arg ref="contextSource" />
</beans:bean>
<beans:bean id="contextSource"
class="org.springframework.ldap.core.support.LdapContextSource">
<beans:property name="url"
value="ldap://xxxxx.com/" />
<beans:property name="base"
value="dc=xxxl,dc=ad,dc=xxxxx,dc=xxx" />
</beans:bean>
<authentication-manager>
<ldap-authentication-provider server-ref="ldapTemplate"
role-prefix="ROLE_USER" />
</authentication-manager>
</beans:beans>