Advertisement
Guest User

Untitled

a guest
Mar 6th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. # To get started with security, check out the documentation:
  2. # https://symfony.com/doc/current/security.html
  3. security:
  4.  
  5. # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
  6. providers:
  7. in_memory:
  8. memory:
  9. users:
  10. ryan:
  11. password: $2y$12$rcpFPGFhlAJmjggrSFK3yeIzzJrgytAk3dQs0haTLJqA0VYYWINGS
  12. roles: 'ROLE_USER'
  13. admin:
  14. password: $2y$12$POimZopEuyiG30cIDv58C.FDVljvaYz3hBwEo8CdOGpTpjS6Q7dbC
  15. roles: 'ROLE_ADMIN'
  16.  
  17. encoders:
  18. Symfony\Component\Security\Core\User\User:
  19. algorithm: bcrypt
  20. cost: 12
  21. firewalls:
  22. # disables authentication for assets and the profiler, adapt it according to your needs
  23. dev:
  24. pattern: ^/(_(profiler|wdt)|css|images|js)/
  25. security: false
  26.  
  27. main:
  28. anonymous: ~
  29. # activate different ways to authenticate
  30. logout_on_user_change: true
  31. form_login:
  32. login_path: login
  33. check_path: login
  34. success_handler: app.login_handler
  35. logout:
  36. path: /logout
  37. target: /
  38.  
  39.  
  40. access_control:
  41. # require ROLE_ADMIN for /admin*
  42. - { path: ^/admin, roles: ROLE_ADMIN }
  43. - { path: ^/user, roles: ROLE_USER }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement