Guest User

Untitled

a guest
Dec 9th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. security:
  2. firewalls:
  3. secured_area:
  4. pattern: ^/
  5. anonymous: ~
  6. form_login:
  7. login_path: /login
  8. check_path: /login_check
  9.  
  10. # by default, the login form *must* be a POST, not a GET
  11. post_only: true
  12.  
  13. # login success redirecting options (read further below)
  14. always_use_default_target_path: false
  15. default_target_path: /
  16. target_path_parameter: _target_path
  17. use_referer: false
  18.  
  19. # field names for the username and password fields
  20. username_parameter: _username
  21. password_parameter: _password
  22.  
  23. # csrf token options
  24. csrf_parameter: _csrf_token
  25. intention: authenticate
  26.  
  27. logout:
  28. path: /logout
  29. target: /
  30.  
  31. # providers:
  32. # in_memory:
  33. # users:
  34. # ryan: { password: ryanpass, roles: 'ROLE_USER' }
  35. # admin: { password: kitten, roles: 'ROLE_ADMIN' }
  36. providers:
  37. main:
  38. entity: { class: Triii\TebBundle\Entity\Utilisateur, property: username }
  39.  
  40. encoders:
  41. Symfony\Component\Security\Core\User\User: plaintext
  42.  
  43. access_control:
  44. - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  45. - { path: ^/, roles: ROLE_ADMIN }
Add Comment
Please, Sign In to add comment