environnement complet autonome, révision complete de la méthode, ajout de configuration
This commit is contained in:
2
config/packages/lock.yaml
Normal file
2
config/packages/lock.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
framework:
|
||||
lock: '%env(LOCK_DSN)%'
|
@ -5,15 +5,30 @@ 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 }
|
||||
pdo_user_provider:
|
||||
id: App\Security\PdoUserProvider
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
lazy: true
|
||||
provider: users_in_memory
|
||||
# lazy: true
|
||||
stateless: false
|
||||
provider: pdo_user_provider
|
||||
custom_authenticators:
|
||||
- App\Security\PdoUserAuthenticator
|
||||
|
||||
entry_point: form_login
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
username_parameter: login
|
||||
password_parameter: password
|
||||
enable_csrf: true
|
||||
|
||||
login_throttling:
|
||||
max_attempts: 3
|
||||
logout: true
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
|
||||
@ -23,8 +38,9 @@ security:
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
||||
# - { path: ^/profile, roles: ROLE_USER }
|
||||
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
||||
- { path: ^/connect, roles: ROLE_USER }
|
||||
# - { path: ^/connect, roles: [IS_AUTHENTICATED_FULLY, ROLE_USER] }
|
||||
|
||||
when@test:
|
||||
security:
|
||||
|
Reference in New Issue
Block a user