security.yml 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. security:
  2. encoders:
  3. Symfony\Component\Security\Core\User\User: plaintext
  4. role_hierarchy:
  5. ROLE_ADMIN: ROLE_USER
  6. ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  7. providers:
  8. in_memory:
  9. users:
  10. user: { password: userpass, roles: [ 'ROLE_USER' ] }
  11. admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  12. firewalls:
  13. dev:
  14. pattern: ^/(_(profiler|wdt)|css|images|js)/
  15. security: false
  16. login:
  17. pattern: ^/demo/secured/login$
  18. security: false
  19. secured_area:
  20. pattern: ^/demo/secured/
  21. form_login:
  22. check_path: /demo/secured/login_check
  23. login_path: /demo/secured/login
  24. logout:
  25. path: /demo/secured/logout
  26. target: /demo/
  27. #anonymous: ~
  28. #http_basic:
  29. # realm: "Secured Demo Area"
  30. access_control:
  31. #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
  32. #- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }