webcron/config/packages/security.yaml

43 lines
1.5 KiB
YAML

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
main:
pattern: ^\/(.*)
provider: app_user_provider
form_login:
login_path: /login
check_path: /login_check
enable_csrf: true
logout:
path: /logout
target: /
remember_me:
secret: '%kernel.secret%'
lifetime: 2419200 # 28 days in seconds
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 }