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.
 
 
 
 
 

66 righe
2.5 KiB

  1. security:
  2. # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
  3. password_hashers:
  4. App\Entity\Central\User:
  5. algorithm: auto
  6. # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
  7. providers:
  8. app_user_provider:
  9. entity:
  10. class: App\Entity\Central\User
  11. property: email
  12. # users_in_memory: { memory: null }
  13. firewalls:
  14. dev:
  15. # Ensure dev tools and static assets are always allowed
  16. pattern: ^/(_(profiler|wdt)|css|images|js)/
  17. security: false
  18. main:
  19. lazy: true
  20. provider: app_user_provider
  21. access_denied_handler: App\Security\AccessDeniedHandler
  22. form_login:
  23. login_path: app_login
  24. check_path: app_login
  25. default_target_path: /week
  26. username_parameter: email
  27. password_parameter: password
  28. enable_csrf: true
  29. logout:
  30. path: app_logout
  31. target: app_login
  32. remember_me:
  33. secret: '%kernel.secret%'
  34. lifetime: 2592000 # 30 Tage
  35. path: /
  36. name: REMEMBERME
  37. # Activate different ways to authenticate:
  38. # https://symfony.com/doc/current/security.html#the-firewall
  39. # https://symfony.com/doc/current/security/impersonating_user.html
  40. # switch_user: true
  41. # Note: Only the *first* matching rule is applied
  42. access_control:
  43. - { path: ^/login, roles: PUBLIC_ACCESS }
  44. - { path: ^/register, roles: PUBLIC_ACCESS }
  45. - { path: ^/api/register, roles: PUBLIC_ACCESS }
  46. - { path: ^/verify/, roles: PUBLIC_ACCESS }
  47. - { path: ^/invite/, roles: PUBLIC_ACCESS }
  48. - { path: ^/$, roles: PUBLIC_ACCESS }
  49. - { path: ^/, roles: ROLE_USER }
  50. when@test:
  51. security:
  52. password_hashers:
  53. # Password hashers are resource-intensive by design to ensure security.
  54. # In tests, it's safe to reduce their cost to improve performance.
  55. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
  56. algorithm: auto
  57. cost: 4 # Lowest possible value for bcrypt
  58. time_cost: 3 # Lowest possible value for argon
  59. memory_cost: 10 # Lowest possible value for argon