multiple firewalls with symfony2

前端 未结 3 1433
北海茫月
北海茫月 2020-12-25 13:14

How to have multiple firewalls with symfony2?

This is mentioned in the documentation but never explained.

3条回答
  •  爱一瞬间的悲伤
    2020-12-25 14:04

    You can have users authenticate into one firewall and be authenticated on others by configuring the same firewall context. Take for example this app/config/security.yml:

    security:
        firewalls:
            filrewall_1:
                ...
                context: my_context
            filrewall_2:
                ...
                context: my_context
    

    http://symfony.com/doc/current/reference/configuration/security.html#firewall-context

提交回复
热议问题