Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

48 righe
1.9 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. users_in_memory: { memory: null }
  8. app_entity_users:
  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_entity_users
  19. custom_authenticators:
  20. - App\Security\JsonAuthenticator
  21. logout:
  22. path: security_logout
  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