1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/security.html
security:
# http://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
maf_provider:
id: AppBundle\Security\UserProvider
encoders:
AppBundle\Model\User: plaintext
firewalls:
# disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
access_denied_handler: AppBundle\Security\AccessDeniedHandler
anonymous: ~
form_login:
login_path: homepage
check_path: login
logout:
path: security_logout
target: homepage
guard:
provider: maf_provider
authenticator:
- AppBundle\Security\UserAuthenticator
remember_me:
secret: '%kernel.secret%'
lifetime: 1209600 # 2 week in seconds
path: ~
domain: ~
remember_me_parameter: checkbox-2
# access_control:
# - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } |