Skip to content

Commit a233e18

Browse files
authored
Set auto password hasher for all user classes (see #6289)
Description ----------- In Symfony 5.3 this config was added to the default security config in order to enable the `auto` password hasher for all user classes that implement this interface (see symfony/recipes#981) - which `Contao\User` also implements. I think we should do the same in the `contao/managed-edition`. This way you don't have to define this yourself in case you are using HTTP Basic Authentication for some controller outside Contao's own firewalls. For instance, in [this example](#6220 (comment)) the line ```php $extensionConfig['password_hashers'][InMemoryUser::class] = 'auto'; ``` could be omitted then. Commits ------- 84c6d47 set auto password hasher to auto for all ab0a671 also set password hasher for Contao\User specifically 593d244 update README and test config
1 parent 9c14a1b commit a233e18

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

core-bundle/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ sections:
6666
security:
6767
password_hashers:
6868
Contao\User: auto
69+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: auto
6970
7071
providers:
7172
contao.security.backend_user_provider:

core-bundle/tests/Functional/app/config/security.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
security:
22
password_hashers:
33
Contao\User: auto
4+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: auto
45

56
providers:
67
contao.security.backend_user_provider:

manager-bundle/skeleton/config/security.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
security:
22
password_hashers:
33
Contao\User: auto
4+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: auto
45

56
providers:
67
contao.security.backend_user_provider:

0 commit comments

Comments
 (0)