security: password-hashers: App\Entity\AdminUser: auto Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: algorithm: 'auto' cost: 15 # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers providers: # used to reload user from session & other features (e.g. switch_user) app_user_provider: entity: class: App\Entity\AdminUser property: email firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: lazy: true provider: app_user_provider #anonymous: true #guard: #custom_authenticators: # - App\Security\AdminAuthenticator # entry_point: App\Security\AdminAuthenticator form-login: login-path: app_login check-path: app_login enable-csrf: true logout: path: app_logout # where to redirect after logout # target: app_any_route custom_authenticator: App\Security\AdminAuthenticator entry-point: App\Security\AdminAuthenticator remember_me: secret: '%kernel.secret%' lifetime: 604800 path: / always_remember_me: true # activate different ways to authenticate # http_basic: true # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate # form_login: true # https://symfony.com/doc/current/security/form_login_setup.html # 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: ^/admin, roles: ROLE_ADMIN } - { path: ^/eintrittsdatum, roles: ROLE_ADMIN }