Advertisement
whitestarrr

Untitled

Apr 14th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. security:
  2. encoders:
  3. # Our user class and the algorithm we'll use to encode passwords
  4. # http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password
  5. WebstoreBundle\Entity\User: bcrypt
  6.  
  7. providers:
  8. # in this example, users are stored via Doctrine in the database
  9. # To see the users at src/AppBundle/DataFixtures/ORM/LoadFixtures.php
  10. # To load users from somewhere else: http://symfony.com/doc/current/cookbook/security/custom_provider.html
  11. database_users:
  12. entity: { class: WebstoreBundle:User, property: username }
  13.  
  14. # http://symfony.com/doc/current/book/security.html#firewalls-authentication
  15. firewalls:
  16. secured_area:
  17. # this firewall applies to all URLs
  18. pattern: ^/
  19.  
  20. # but the firewall does not require login on every page
  21. # denying access is done in access_control or in your controllers
  22. anonymous: true
  23.  
  24. # This allows the user to login by submitting a username and password
  25. # Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
  26. form_login:
  27. # The route name that the login form submits to
  28. check_path: security_login
  29. # The name of the route where the login form lives
  30. # When the user tries to access a protected page, they are redirected here
  31. login_path: security_login
  32. # Secure the login form against CSRF
  33. # Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
  34. csrf_token_generator: security.csrf.token_manager
  35.  
  36. logout:
  37. # The route name the user can go to in order to logout
  38. path: security_logout
  39. # The name of the route to redirect to after logging out
  40. target: shop_index
  41.  
  42. access_control:
  43. # this is a catch-all for the admin area
  44. # additional security lives in the controllers
  45. # - { path: '^/(%locale%)/admin', roles: ROLE_ADMIN }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement