0

I want to implement impersonate in symfony2 without editing security.yml file. How can I do that?

Mohammed H
  • 6,880
  • 16
  • 81
  • 127

1 Answers1

1

Not sure why this is needed, but if it is I'd take a look at how the SecurityBundle achieves this functionality and implement my own version.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php

Create your own kernel listener that mimics this functionality with your own custom entry point.

Chris Tickner
  • 2,008
  • 2
  • 20
  • 24