react-logo/backend/config/packages/security.yaml

34 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2020-02-04 17:20:39 +01:00
security:
2020-02-17 22:28:57 +01:00
encoders:
App\Entity\User:
algorithm: auto
2020-02-04 17:20:39 +01:00
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
2020-02-17 22:28:57 +01:00
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
property: username
2020-02-04 17:20:39 +01:00
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
2020-02-17 22:28:57 +01:00
anonymous: ~
json_login:
check_path: /api/v1/login
logout:
path: /api/v1/logout
target: /api/v1
2020-02-04 17:20:39 +01:00
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication
# 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: