I need to authenticate a user in symfony2. The issue I am having is that my user is authenticated over a rest service. I send a login and password to this service and I receive the user and session as a response, or error.
It seems that in order to grant access to a firewall, I have to have a user provider, one that extends UserProviderInterface and requires the loadUserByUsername() method. And at some point symfony is going to do a password check in the background between the provided user and the login credentials.
How do I skip a user provider and symfony2 login check, and instead use a custom authentication provider that will authenticate properly with symfony2 security and allow me to define roles and firewalls in the security config.
In a nutshell, I want to authenticate through a rest interface, but authorize with symfony.