Skip to content

Commit

Permalink
Use firewall to secure user profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
Barvoj committed Oct 21, 2016
1 parent affae6f commit 0e65ffb
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ security:
entity: { class: AppBundle:User, property: username }

firewalls:
user_area:
pattern: ^/profile

form_login:
check_path: user_login
login_path: user_login
csrf_token_generator: security.csrf.token_manager
default_target_path: /

logout:
# The route name the user can go to in order to logout
path: user_logout
# The name of the route to redirect to after logging out
target: homepage

context: primary_auth

secured_area:
pattern: ^/

Expand All @@ -24,4 +41,6 @@ security:
# The route name the user can go to in order to logout
path: user_logout
# The name of the route to redirect to after logging out
target: homepage
target: homepage

context: primary_auth

0 comments on commit 0e65ffb

Please sign in to comment.