upstream V3 development https://www.gnusocial.rocks/v3
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.
 
 
 
 
 
 

56 lines
2.0 KiB

  1. security:
  2. enable_authenticator_manager: true
  3. password_hashers:
  4. App\Entity\LocalUser:
  5. algorithm: auto
  6. providers:
  7. # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  8. local_user:
  9. chain:
  10. providers: [local_user_by_nickname, local_user_by_email]
  11. local_user_by_nickname:
  12. entity:
  13. class: 'App\Entity\LocalUser'
  14. property: 'nickname'
  15. local_user_by_email:
  16. entity:
  17. class: 'App\Entity\LocalUser'
  18. property: 'outgoing_email'
  19. firewalls:
  20. dev:
  21. pattern: ^/(_(profiler|wdt)|css|images|js)/
  22. security: false
  23. main:
  24. entry_point: App\Security\Authenticator
  25. guard:
  26. authenticators:
  27. - App\Security\Authenticator
  28. provider: local_user
  29. form_login:
  30. login_path: security_login
  31. check_path: security_login
  32. enable_csrf: true
  33. logout:
  34. path: security_logout
  35. # where to redirect after logout
  36. target: main_all
  37. remember_me:
  38. secret: '%kernel.secret%'
  39. secure: true
  40. httponly: '%remember_me_httponly%'
  41. samesite: '%remember_me_samesite%'
  42. token_provider: 'Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider'
  43. # activate different ways to authenticate
  44. # https://symfony.com/doc/current/security.html#firewalls-authentication
  45. # https://symfony.com/doc/current/security/impersonating_user.html
  46. # switch_user: true
  47. # Easy way to control access for large sections of your site
  48. # Note: Only the *first* access control that matches will be used
  49. access_control:
  50. - { path: ^/admin, roles: ROLE_ADMIN }
  51. - { path: ^/settings, roles: ROLE_USER }