2022-04-27 14:24:48 +02:00
|
|
|
security:
|
|
|
|
enable_authenticator_manager: true
|
|
|
|
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
|
|
|
password_hashers:
|
|
|
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
|
|
|
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
|
|
|
providers:
|
|
|
|
app_user_provider:
|
|
|
|
entity:
|
|
|
|
class: App\Entity\User
|
|
|
|
property: email
|
|
|
|
firewalls:
|
|
|
|
dev:
|
|
|
|
pattern: ^/(_(profiler|wdt)|css|images|js|health)/
|
|
|
|
security: false
|
2022-05-24 18:09:14 +02:00
|
|
|
login:
|
|
|
|
pattern: ^/?(%enabled_locales%)/(login|login_check|health)(?=.*)
|
|
|
|
security: false
|
2022-04-27 14:24:48 +02:00
|
|
|
main:
|
|
|
|
pattern: ^\/(.*)
|
|
|
|
provider: app_user_provider
|
|
|
|
|
|
|
|
form_login:
|
2022-04-28 16:25:34 +02:00
|
|
|
login_path: login
|
|
|
|
check_path: login_check
|
2022-04-27 14:24:48 +02:00
|
|
|
enable_csrf: true
|
|
|
|
logout:
|
2022-04-28 16:25:34 +02:00
|
|
|
path: logout
|
|
|
|
target: login
|
2022-04-27 14:24:48 +02:00
|
|
|
remember_me:
|
|
|
|
secret: '%kernel.secret%'
|
2022-05-18 10:28:49 +02:00
|
|
|
lifetime: '%env(int:COOKIE_LIFETIME)%'
|
2022-04-27 14:24:48 +02:00
|
|
|
path: /
|
|
|
|
secure: true
|
|
|
|
# activate different ways to authenticate
|
|
|
|
# https://symfony.com/doc/current/security.html#the-firewall
|
|
|
|
|
|
|
|
# https://symfony.com/doc/current/security/impersonating_user.html
|
|
|
|
# switch_user: true
|
|
|
|
|
|
|
|
# Easy way to control access for large sections of your site
|
|
|
|
# Note: Only the *first* access control that matches will be used
|
|
|
|
access_control:
|
|
|
|
- { path: ^/(?!login|login_check|health)(?=.*), roles: ROLE_USER }
|
|
|
|
# - { path: ^/profile, roles: ROLE_USER }
|