title: LDAP Spring security login-processing-url 302 error
body: <p>I have a web application that connects to an LDAP server, everything works fine until now create a new branch in LDAP and processing url I get "Error 302 Moved Temporarily". I had never been anything like this, I have the configuration of the LDAP server in a .properties. </p>
  
  <p>The strange thing is that I work very well for a configuration, but now that you create a new branch for testing, I get this error. </p>
  
  <p>Nose that will be what makes this happen, be if I can help. </p>
  
  <p>These are my files. </p>
  
  <p>With this configuration works</p>
  
  <pre><code>#Properties LDAP Server
  ldap.context.initialContextFactory  = com.sun.jndi.ldap.LdapCtxFactory
  ldap.context.providerUrl            = ldap://192.168.0.31:389/dc=store,dc=web,dc=ap
  ldap.context.securityAuthentication = simple
  ldap.context.securityPrincipal      = cn=admin,dc=web,dc=ap
  ldap.context.securityCredentials    = adm5569
  </code></pre>
  
  <p>With this configuration I send the HTTP Error 302 Moved Temporarily</p>
  
  <pre><code>#Properties LDAP Server
  ldap.context.initialContextFactory  = com.sun.jndi.ldap.LdapCtxFactory
  ldap.context.providerUrl            = ldap://192.168.0.31:389/dc=store2,dc=web,dc=ap
  ldap.context.securityAuthentication = simple
  ldap.context.securityPrincipal      = cn=admin,dc=web,dc=ap
  ldap.context.securityCredentials    = adm5569
  </code></pre>
  
  <p>this is my security.xml file</p>
  
  <pre><code>&lt;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.0.xsd
                      http://www.springframework.org/schema/security 
                      http://www.springframework.org/schema/security/spring-security-3.1.xsd"&gt;
  
      &lt;http pattern="/webapp/ViewChangePassword" security="none" /&gt; 
      &lt;http pattern="/webapp/LogonForm" security="none" /&gt;
  
  
      &lt;http auto-config="true"&gt;
          &lt;intercept-url pattern="/webapp/Home" access="ROLE_USER" /&gt;
          &lt;intercept-url pattern="/webapp/ListStore" access="IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER" /&gt;
          &lt;intercept-url pattern="/webapp/CheckStoreJson" access="IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER" /&gt;
          &lt;intercept-url pattern="/webapp/ViewChangePassword" access="IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER" /&gt;
          &lt;intercept-url pattern="/webapp/ChangePassword" access="IS_AUTHENTICATED_ANONYMOUSLY, ROLE_USER" /&gt;
          &lt;intercept-url pattern="/webapp/**" access="ROLE_USER" /&gt;
  
      &lt;form-login login-page="/webapp/LogonForm" default-target-url="/webapp/Home" authentication-failure-url="/webapp/LogonForm?code=1" login-processing-url="/webapp/LogOn" /&gt;
          &lt;logout logout-url="/webapp/LogOut" logout-success-url="/webapp/LogonForm?code=2" /&gt; 
      &lt;/http&gt;
  
      &lt;authentication-manager&gt;
          &lt;authentication-provider ref="ldapAuthProvider"/&gt;
      &lt;/authentication-manager&gt;
  
      &lt;ldap-server id="ldapServer" url="ldap://${ldap.server.ip}:${ldap.server.port}/${ldap.server.root}"/&gt;
  
  
      &lt;beans:bean class="org.springframework.security.ldap.authentication.BindAuthenticator" id="ldapBindAuthenticator" &gt;
          &lt;beans:constructor-arg ref="ldapServer"/&gt;
          &lt;beans:property name="userSearch" ref="userSearch"/&gt;
      &lt;/beans:bean&gt;
  
  
      &lt;beans:bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch" &gt;
          &lt;beans:constructor-arg index="0" value="ou=usuarios"/&gt;
          &lt;beans:constructor-arg index="1" value="(uid={0})"/&gt;
          &lt;beans:constructor-arg index="2" ref="ldapServer" /&gt;
      &lt;/beans:bean&gt;
  
  
      &lt;beans:bean class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator" id="ldapAuthoritiesPopulator" &gt;
          &lt;beans:constructor-arg ref="ldapServer"/&gt;
          &lt;beans:constructor-arg value="${ldap.springrole.rdn}"/&gt;
          &lt;beans:property name="groupRoleAttribute" value="${ldap.springrole.attribute}"/&gt;
          &lt;beans:property name="rolePrefix" value="${ldap.springrole.prefix}"/&gt;
          &lt;beans:property name="groupSearchFilter" value="(objectClass=organizationalRole)"/&gt;
          &lt;beans:property name="searchSubtree" value="true" /&gt;
      &lt;/beans:bean&gt;
  
  
      &lt;beans:bean id="ldapAuthProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider" &gt;
          &lt;beans:constructor-arg ref="ldapBindAuthenticator"/&gt;
          &lt;beans:constructor-arg ref="ldapAuthoritiesPopulator"/&gt;
          &lt;beans:property name="userDetailsContextMapper" ref="ldapUserDetailsContextMapper"/&gt;
      &lt;/beans:bean&gt;
  
  
      &lt;beans:bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate"&gt;
          &lt;beans:constructor-arg ref="ldapServer"/&gt;
      &lt;/beans:bean&gt;
  
      &lt;beans:bean class="cl.bbr.security.UserLdapMapper" id="ldapUserDetailsContextMapper"&gt;
          &lt;beans:property name="template"         ref="ldapTemplate"/&gt;
      &lt;/beans:bean&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>EDIT (1) 29-10-2014</p>
  
  <p>302 Moved Temporarily The error appears in the Debug console google Chrome, attempting to log in through the login, redirects me to the login error page and Debug Console google I figure that the URL to process authentication with the Security is temporarily moved.</p>
  
  <p>Help please.</p>