add authentication
This commit is contained in:
@@ -41,10 +41,14 @@ when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: [ "!event" ]
|
||||
#type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
#excluded_http_codes: [404, 405]
|
||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||
nested:
|
||||
type: stream
|
||||
@@ -58,4 +62,4 @@ when@prod:
|
||||
deprecation:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: php://stderr
|
||||
path: php://stderr
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user