Advertisement
Guest User

Untitled

a guest
Jan 11th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. # To get started with security, check out the documentation:
  2. # http://symfony.com/doc/current/book/security.html
  3. security:
  4.  
  5.  
  6.  
  7. # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  8. providers:
  9. in_memory:
  10. memory:
  11. users:
  12. admin:
  13. password: $2y$12$7A7ucSLjvxfYGNbmY1cifOn3awqH9AKs3S6dLUIi4wAbvmqlJgv.u
  14. roles: ['ROLE_ADMIN','ROLE_USER']
  15. cedric:
  16. password: cedric
  17. roles: 'ROLE_USER'
  18.  
  19. encoders:
  20. Symfony\Component\Security\Core\User\User:
  21. algorithm: bcrypt
  22. cost: 12
  23.  
  24. #Firewall is authentication system. There's only one firewall that is active on one request.
  25. firewalls:
  26. # disables authentication for assets and the profiler, adapt it according to your needs
  27. dev:
  28. pattern: ^/(_(profiler|wdt)|css|images|js)/
  29. security: false
  30.  
  31. #No pattern key, so matches all requests.
  32. main:
  33. anonymous: ~
  34. guard:
  35. authenticators:
  36. - app.security.login_form_authenticator
  37.  
  38. remember_me:
  39. secret: '%secret%'
  40. lifetime: 604800 # 1 week in seconds
  41. path: /
  42.  
  43. logout:
  44. path: /logout
  45. # activate different ways to authenticate
  46.  
  47. # http_basic: ~
  48. # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
  49.  
  50. # form_login: ~
  51. # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
  52.  
  53. access_control:
  54. - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  55. - { path: ^/logout, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  56. # require ROLE_ADMIN for /admin*
  57. - { path: ^/, roles: ROLE_ADMIN }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement