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.
 
 
 

47 regels
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. api:
  17. pattern: ^/api/
  18. stateless: true
  19. provider: app_user_provider
  20. jwt: ~
  21. main:
  22. json_login:
  23. check_path: /auth # The name in routes.yaml is enough for mapping
  24. username_path: email
  25. password_path: password
  26. success_handler: lexik_jwt_authentication.handler.authentication_success
  27. failure_handler: lexik_jwt_authentication.handler.authentication_failure
  28. # Easy way to control access for large sections of your site
  29. # Note: Only the *first* access control that matches will be used
  30. access_control:
  31. # - { path: ^/admin, roles: ROLE_ADMIN }
  32. # - { path: ^/profile, roles: ROLE_USER }
  33. when@test:
  34. security:
  35. password_hashers:
  36. # By default, password hashers are resource intensive and take time. This is
  37. # important to generate secure password hashes. In tests however, secure hashes
  38. # are not important, waste resources and increase test times. The following
  39. # reduces the work factor to the lowest possible values.
  40. Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
  41. algorithm: auto
  42. cost: 4 # Lowest possible value for bcrypt
  43. time_cost: 3 # Lowest possible value for argon
  44. memory_cost: 10 # Lowest possible value for argon