mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Use the new authenticator system introduced in symfony 5.1
This commit is contained in:
parent
1dfd66fe7b
commit
93d817db81
2 changed files with 10 additions and 12 deletions
|
@ -1,22 +1,23 @@
|
||||||
security:
|
security:
|
||||||
encoders:
|
enable_authenticator_manager: true
|
||||||
App\Entity\UserSystem\User:
|
|
||||||
algorithm: auto
|
password_hashers:
|
||||||
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||||
|
|
||||||
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
||||||
providers:
|
providers:
|
||||||
|
|
||||||
# used to reload user from session & other features (e.g. switch_user)
|
# used to reload user from session & other features (e.g. switch_user)
|
||||||
app_user_provider:
|
app_user_provider:
|
||||||
entity:
|
entity:
|
||||||
class: App\Entity\UserSystem\User
|
class: App\Entity\UserSystem\User
|
||||||
property: name
|
property: name
|
||||||
|
|
||||||
firewalls:
|
firewalls:
|
||||||
dev:
|
dev:
|
||||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||||
security: false
|
security: false
|
||||||
main:
|
main:
|
||||||
anonymous: true
|
provider: app_user_provider
|
||||||
lazy: true
|
lazy: true
|
||||||
user_checker: App\Security\UserChecker
|
user_checker: App\Security\UserChecker
|
||||||
|
|
||||||
|
@ -25,16 +26,13 @@ security:
|
||||||
check_path: 2fa_login_check
|
check_path: 2fa_login_check
|
||||||
enable_csrf: true
|
enable_csrf: true
|
||||||
|
|
||||||
# activate different ways to authenticate
|
|
||||||
|
|
||||||
#http_basic: true
|
|
||||||
# https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
|
|
||||||
|
|
||||||
# https://symfony.com/doc/current/security/form_login_setup.html
|
# https://symfony.com/doc/current/security/form_login_setup.html
|
||||||
form_login:
|
form_login:
|
||||||
login_path: login
|
login_path: login
|
||||||
check_path: login
|
check_path: login
|
||||||
csrf_token_generator: security.csrf.token_manager
|
enable_csrf: true
|
||||||
use_referer: true
|
use_referer: true
|
||||||
default_target_path: '/'
|
default_target_path: '/'
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
security:
|
security:
|
||||||
|
|
||||||
# Disable password hashing during testing. This speeds up tests a lot
|
# Disable password hashing during testing. This speeds up tests a lot
|
||||||
encoders:
|
password_hashers:
|
||||||
App\Entity\UserSystem\User:
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'plaintext'
|
||||||
algorithm: plaintext
|
|
||||||
|
|
||||||
firewalls:
|
firewalls:
|
||||||
# replace 'main' by the name of your own firewall
|
# replace 'main' by the name of your own firewall
|
||||||
main:
|
main:
|
||||||
|
entry_point: http_basic
|
||||||
http_basic: ~
|
http_basic: ~
|
Loading…
Add table
Add a link
Reference in a new issue