4

How FOS User Bundle authenticates the user by this service container?

$this->container->get('security.context')->getToken()->getUser();

I want to manipulate the authentication process. Where should I look in the bundle?

1 Answer 1

7

Actually FOSUserBundle doesn't do authentication. It actually provides a db user provider. Authentication part is done by Symfony2's internal form_login authentication provider. If you want to create custom authentication provider check this cookbook entry.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you - the answer I've been looking for....! I have been trying to create an event listener to modify the authentication process for FOSUserBundle but couldn't find any leads; this is the only answer I've come across that says FOSUserBundle doesn't do authentication :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.