45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
security:
|
|
encoders:
|
|
App\Entity\User:
|
|
id: app.password.encoder
|
|
|
|
role_hierarchy:
|
|
ROLE_USER:
|
|
ROLE_ADMIN:
|
|
|
|
firewalls:
|
|
dev:
|
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
security: false
|
|
|
|
main:
|
|
pattern: ^/
|
|
anonymous: true
|
|
provider: main
|
|
form_login:
|
|
login_path: app_login
|
|
check_path: app_login
|
|
default_target_path: app_home
|
|
use_referer: true
|
|
csrf_parameter: _csrf_security_token
|
|
csrf_token_id: a_private_string
|
|
|
|
logout:
|
|
invalidate_session: true
|
|
path: app_logout
|
|
target: app_home
|
|
|
|
|
|
providers:
|
|
main:
|
|
entity:
|
|
class: App\Entity\User
|
|
property: username
|
|
|
|
|
|
|
|
access_control:
|
|
- { path: ^/user, roles: [ROLE_ADMIN, ROLE_USER] }
|
|
- { path: ^/config, roles: [ROLE_ADMIN] }
|
|
|