Guest User

Untitled

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