Add User entity and security

This commit is contained in:
2024-12-19 07:59:59 +01:00
parent 09ebe7dded
commit 615a516ac2
4 changed files with 207 additions and 2 deletions

View File

@@ -4,14 +4,22 @@ security:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
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)/
security: false
main:
lazy: true
provider: users_in_memory
provider: app_user_provider
json_login:
check_path: app_login
username_path: username
password_path: password
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall