In the Symfony 2 Docs
# app/config/security.yml
security:
firewalls:
secured_area:
pattern: ^/
anonymous: ~
form_login:
login_path: /login
check_path: /login_check
This looks like it could have multiple different form_login‘s? Is pattern required? If I define my ACL in controller actions like:
/**
* @Secure(roles="ROLE_ADMIN")
*/
public function helloAction($name)
{
// ...
}
Do I still need the pattern? Also which login_path and check_path will this (annotations) lead to, supposing there are multiple definitions of login_form
You can’t have multiple
form_login‘s. What you can have is multiplefirewalls. Eachfirewallcan then contain apatternand theform_loginetc.patternis required for eachfirewall. The annotations will lead to thelogin_pathandcheck_pathof the relevantfirewall(relevantfirewallbeing the one whosepatternmatches the URL in question).