In fact, FOSUserBundle does not authenticate. It actually provides a db service provider. Part of the authentication is done by the internal authentication provider form_login
Symfony2. If you want to create your own authentication provider, check this entry in the cookbook.
source share