title: Manual authentication check Symfony 2
body: <p>I'm working on a Symfony 2 application where the user must select a profile during the login process.</p>
  
  <p>Users may have multiples profiles to work with and they only know their own profiles. So first, I need to prompt for username and password, if those are correct, I should not login the user, I need to prompt for profile witch user will use during the session.</p>
  
  <p>So, I show a form with a username and password field, and send it using an Ajax request, that request responds with the profile list if username and password are correct or an error code otherwise. Finally the user logs into the system using username, password and profile.</p>
  
  <p>The problem is that I don't know how to check if authentication data is correct (using all my authentication managers, users providers, etc) to accomplish this intermediate step (prompts for profile) without in fact logging the user.</p>
  
  <p>Can anyone help me with this?</p>