title: How to verify password with Spring
body: <p>I have found out how to hash the password of some one and persist it in the database with SpringMVC:</p>
  
  <pre><code>BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
  String pw = passwordEncoder.encode("test");
  </code></pre>
  
  <p>Now the question is, how I can verify the password coming from the request to let the user login my web app? 
  After some research I saw, that there are a lot of ways to do this. Some solutions works with user roles.</p>
  
  <p>What my webapps should do is to offer my users a login page where they can register (here I would persist the password with the code shown above). After
  registering they should be able to login, which means I need to verify the password from the login form.
  Is there any state of the art example out there?</p>