add authentication

This commit is contained in:
Marko
2023-11-02 14:39:37 +01:00
parent e8a531b407
commit ae7c9df246
4 changed files with 82 additions and 8 deletions

View File

@@ -4,14 +4,20 @@ 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 }
users_in_memory: { memory: {
users: [
{ identifier: "ahch0joh9ahthoh6xiew9Eer5aevieR1", roles: ["ROLE_USER"] }
]
} }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
lazy: true
#lazy: true
provider: users_in_memory
custom_authenticators:
- App\Security\ApiKeyAuthenticator
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall
@@ -36,4 +42,4 @@ when@test:
algorithm: auto
cost: 4 # Lowest possible value for bcrypt
time_cost: 3 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon