Symfony 2 -security.yml: How to create an exception pattern inside the firewalls? -
example: have inside firewalls
secured_area: pattern: ^/ form_login: check_path: /secured/login_check login_path: /secured/login logout: path: /secured/logout target: / context: primary_auth
i access pattern => ^/toto
without login.
please, me ?
with this, can access it.
#change path security: secured_area: anonymous: ~ pattern: ^/ form_login: check_path: /secured/login_check login_path: /secured/login logout: path: /secured/logout target: / context: primary_auth access_control: - { path: /toto, roles: is_authenticated_anonymously } - { path: ^/login, roles: is_authenticated_anonymously } - { path: ^/ , roles: role_user }
edit :
don't forget anonymous : ~ (let anonymous user use (for toto))
and let authorization via access_control