title: Decode a password before login Spring Boot
body: <p>I have a login form with spring security jdbc authentication, it works well with normal form submission.</p>
  
  <p>Now i've encrypted the user password on client side with javascript, i use <code>cryptoJs</code> and the encrypted password is submitted to the server, the problem is that i have to decode the password before let spring check the password hash in the database and i can't figure how to do that, i've tried with a custom filter </p>
  
  <pre><code>public class LoginFilter extends UsernamePasswordAuthenticationFilter{
  
      public LoginFilter(AuthenticationManager auth){
          super.setAuthenticationManager(auth);
      }
  
      @Override
      public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException{
          //Decode password
          return super.attemptAuthentication(request, response);
      } 
  
  }
  </code></pre>
  
  <p>it intercept the request, i can get the password and decode it but i can't pass to the <code>UsernamePasswordAuthenticationFilter</code>, how can i pass to spring the decoded password instead of the encoded submitted by the user?
  P.S. I'm not using Https and i know that javascript encryption is probably useless</p>