I am trying to configure two separate login form with two different provider, but i keep getting this error when i am trying to login to the "private_login".
Both route are configure separately and i have both SecurityController.
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
apx_firewall:
pattern: ^/
form_login:
provider: in_memory
login_path: /login
check_path: /login_check
csrf_token_generator: security.csrf.token_manager
default_target_path: /
logout:
invalidate_session: true
delete_cookies:
REMEMBERME: { path: null, domain: null}
path: /logout
target: /
remember_me:
secret: "%secret%"
lifetime: 777600 # 90 jours (en seconde)
path: /
domain: ~
security: true
anonymous: true
apx_private:
pattern: ^/
form_login:
provider: apx_provider
login_path: private_login
check_path: private_login_check
csrf_token_generator: security.csrf.token_manager
default_target_path: /espace-franchises
logout:
invalidate_session: true
delete_cookies:
REMEMBERME: { path: null, domain: null}
path: private_logout
target: /espace-franchises
remember_me:
secret: "%secret%"
lifetime: 777600 # 90 jours (en seconde)
path: /
domain: ~
security: true
anonymous: true
Any suggestion ?
答案 0 :(得分:0)
您不能在同一模式/路径上设置2个防火墙。
根据我的要求,您应该只能在/espace-franchises
上设置第二个防火墙。这样做,并首先移动它(因为使用了第一个匹配的防火墙)。