Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to implement impersonate in symfony2 without editing security.yml file. How can I do that?
security.yml
不知道为什么需要这样做,但如果需要,我会看看 SecurityBundle 如何实现此功能并实现我自己的版本。
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
创建您自己的内核侦听器,使用您自己的自定义入口点模仿此功能。