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.

62 lines
2.3 KiB

  1. security:
  2. # https://symfony.com/doc/current/security/experimental_authenticators.html
  3. enable_authenticator_manager: true
  4. # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  5. password_hashers:
  6. App\Entity\User:
  7. algorithm: argon2i
  8. role_hierarchy:
  9. role_admin: ROLE_USER
  10. role_super_admin: ROLE_SUPER_ADMIN
  11. providers:
  12. pdadmin_auth:
  13. entity:
  14. class: App\Entity\User
  15. property: email
  16. firewalls:
  17. dev:
  18. pattern: ^/(_(profiler|wdt)|css|images|js)/
  19. security: false
  20. admin:
  21. pattern: /admin(.*)
  22. provider: pdadmin_auth
  23. lazy: true
  24. user_checker: Pd\UserBundle\Security\UserChecker
  25. switch_user: true
  26. http_basic: ~
  27. entry_point: form_login
  28. form_login:
  29. use_referer: true
  30. login_path: security_login
  31. check_path: security_login
  32. # provider: fos_userbundle
  33. # login_path: /admin/login
  34. use_forward: false
  35. # check_path: /admin/login_check
  36. failure_path: null
  37. # csrf_token_generator: security.csrf.token_manager
  38. logout:
  39. path: security_logout
  40. #path: /admin/logout
  41. remember_me:
  42. secret: '%env(APP_SECRET)%'
  43. #lifetime: 604800
  44. path: /
  45. main:
  46. lazy: true
  47. #provider: users_in_memory
  48. # activate different ways to authenticate
  49. # https://symfony.com/doc/current/security.html#firewalls-authentication
  50. # https://symfony.com/doc/current/security/impersonating_user.html
  51. # switch_user: true
  52. # Easy way to control access for large sections of your site
  53. # Note: Only the *first* access control that matches will be used
  54. access_control:
  55. - { path: ^/admin/login$, role: PUBLIC_ACCESS }
  56. - { path: ^/admin/register, role: PUBLIC_ACCESS }
  57. - { path: ^/admin/resetting, role: PUBLIC_ACCESS }
  58. - { path: ^/admin, roles: ROLE_ADMIN }
  59. - { path: ^/profile, roles: ROLE_USER }