added User entity

This commit is contained in:
2021-05-30 17:41:18 +02:00
parent 914f19c043
commit 5a15194c5b
6 changed files with 307 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ doctrine:
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '13'
server_version: '10.5.9-MariaDB-log'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware

View File

@@ -1,7 +1,15 @@
security:
encoders:
App\Entity\User:
algorithm: auto
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
users_in_memory: { memory: null }
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
property: username
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
@@ -9,7 +17,7 @@ security:
main:
anonymous: true
lazy: true
provider: users_in_memory
provider: app_user_provider
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication