Permalink
Browse files

merged branch oscherler/security-routes (PR #454)

This PR was merged into the master branch.

Commits
-------

7eda9be Changed the login/check/logout paths in security.yml to route names.

Discussion
----------

Use route names for login/check/logout paths in security.yml

It might be a good idea to switch the firewall login, logout and check paths to route names in `security.yml`, if only to draw attention to the fact that it’s possible (and probably a good idea?):

    secured_area:
        pattern:    ^/demo/secured/
        form_login:
            check_path: _security_check
            login_path: _demo_login
        logout:
            path:   _demo_logout
            target: _demo

As mentioned in symfony/symfony#1493, it’s apparently the right way to do it if you want a localised login page. At least that’s what I had to do after I prefixed the FOSUserBundle routes with `/{_locale}/`.

---------------------------------------------------------------------------

by brikou at 2012-12-01T07:21:17Z

👍
  • Loading branch information...
2 parents f535047 + 7eda9be commit fe79e7ada590f1e31149cf7960e02a3ec0c28f79 @fabpot fabpot committed Dec 1, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 app/config/security.yml
View
@@ -29,11 +29,11 @@ security:
secured_area:
pattern: ^/demo/secured/
form_login:
- check_path: /demo/secured/login_check
- login_path: /demo/secured/login
+ check_path: _security_check
+ login_path: _demo_login
logout:
- path: /demo/secured/logout
- target: /demo/
+ path: _demo_logout
+ target: _demo
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"

0 comments on commit fe79e7a

Please sign in to comment.