No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

67 líneas
2.6 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. user_checker: App\Security\ArchivedUserChecker
  21. provider: app_user_provider
  22. access_denied_handler: App\Security\AccessDeniedHandler
  23. form_login:
  24. login_path: app_login
  25. check_path: app_login
  26. default_target_path: /week
  27. username_parameter: email
  28. password_parameter: password
  29. enable_csrf: true
  30. logout:
  31. path: app_logout
  32. target: app_login
  33. remember_me:
  34. secret: '%kernel.secret%'
  35. lifetime: 2592000 # 30 Tage
  36. path: /
  37. name: REMEMBERME
  38. # Activate different ways to authenticate:
  39. # https://symfony.com/doc/current/security.html#the-firewall
  40. # https://symfony.com/doc/current/security/impersonating_user.html
  41. # switch_user: true
  42. # Note: Only the *first* matching rule is applied
  43. access_control:
  44. - { path: ^/login, roles: PUBLIC_ACCESS }
  45. - { path: ^/register, roles: PUBLIC_ACCESS }
  46. - { path: ^/api/register, roles: PUBLIC_ACCESS }
  47. - { path: ^/verify/, roles: PUBLIC_ACCESS }
  48. - { path: ^/invite/, roles: PUBLIC_ACCESS }
  49. - { path: ^/$, roles: PUBLIC_ACCESS }
  50. - { path: ^/, roles: ROLE_USER }
  51. when@test:
  52. security:
  53. password_hashers:
  54. # Password hashers are resource-intensive by design to ensure security.
  55. # In tests, it's safe to reduce their cost to improve performance.
  56. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
  57. algorithm: auto
  58. cost: 4 # Lowest possible value for bcrypt
  59. time_cost: 3 # Lowest possible value for argon
  60. memory_cost: 10 # Lowest possible value for argon