40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
security:
|
|
# https://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
|
|
encoders:
|
|
App\Entity\User:
|
|
algorithm: bcrypt
|
|
cost: 12
|
|
providers:
|
|
user:
|
|
entity:
|
|
class: App\Entity\User
|
|
property: username
|
|
firewalls:
|
|
dev:
|
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
security: false
|
|
|
|
login:
|
|
pattern: ^\/login$
|
|
methods: [GET]
|
|
security: false
|
|
|
|
main:
|
|
form_login:
|
|
login_path: login
|
|
check_path: login
|
|
logout:
|
|
path: logout
|
|
target: /
|
|
remember_me:
|
|
secret: '%env(APP_SECRET)%'
|
|
lifetime: 604800
|
|
path: /
|
|
|
|
# activate different ways to authenticate
|
|
|
|
# http_basic: ~
|
|
# https://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
|
|
|
|
# form_login: ~
|
|
# https://symfony.com/doc/current/cookbook/security/form_login_setup.html
|