Symfony2 authentication I am currently developing a website using the framework Symfony2. I am nearly at the end of its development, and just the "security" part is missing (authentication and authorization). What I would like is to use Symfony2 core bundle to authorize the user but I want to use my Drupal database to get the authentication of the user.

I have previously used the module Services 3 with a REST server to get the user information and to authorize him/she to go on my website (which was flat php coded). Now, I want to make something robust and secure, so here my question, do you know a method for getting the authentication from the Drupal website and then authorize the user via Symfony core bundle?

Here are my 2 thoughts about it:

-> Fetch the user data ($username &amp; $password) using the REST server and a query made in my custom UserProvider (Symfony Doc) and then leave Symfony makes the authentication using the Drupal's password encoder. But here the problem is that when you fetch the user data using the REST server, you get everything but the password.

-> Get access to the Drupal database using Doctrine as usual in my application and fetch the user &amp; pass from it. Then use the Drupal's password encoder to check this result.

To conclude, I am really far to be an expert on this kind of stuff, so I would really appreciate your help.
You can use a custom User Provider in Symonfy and then use the Service Module from Drupal to login via a REST interface