Skip to content

Commit

Permalink
merged branch oscherler/security-routes (PR symfony#454)
Browse files Browse the repository at this point in the history
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

:+1:
  • Loading branch information
fabpot committed Dec 1, 2012
2 parents f535047 + 7eda9be commit fe79e7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fe79e7a

Please sign in to comment.