You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 line
2.0 KiB

  1. security:
  2. # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
  3. password_hashers:
  4. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
  5. # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
  6. providers:
  7. # used to reload user from session & other features (e.g. switch_user)
  8. app_user_provider:
  9. entity:
  10. class: App\Entity\User
  11. property: email
  12. firewalls:
  13. dev:
  14. pattern: ^/(_(profiler|wdt)|css|images|js)/
  15. security: false
  16. main:
  17. lazy: true
  18. provider: app_user_provider
  19. json_login:
  20. check_path: app_login
  21. username_path: email
  22. password_path: password
  23. # activate different ways to authenticate
  24. # https://symfony.com/doc/current/security.html#the-firewall
  25. # https://symfony.com/doc/current/security/impersonating_user.html
  26. # switch_user: true
  27. # Easy way to control access for large sections of your site
  28. # Note: Only the *first* access control that matches will be used
  29. access_control:
  30. # - { path: ^/admin, roles: ROLE_ADMIN }
  31. # - { path: ^/profile, roles: ROLE_USER }
  32. when@test:
  33. security:
  34. password_hashers:
  35. # By default, password hashers are resource intensive and take time. This is
  36. # important to generate secure password hashes. In tests however, secure hashes
  37. # are not important, waste resources and increase test times. The following
  38. # reduces the work factor to the lowest possible values.
  39. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
  40. algorithm: auto
  41. cost: 4 # Lowest possible value for bcrypt
  42. time_cost: 3 # Lowest possible value for argon
  43. memory_cost: 10 # Lowest possible value for argon