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.
 
 
 
 
 
 

49 lines
1.7 KiB

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