Skip to content

Commit bc2970f

Browse files
committed
minor #13188 [Security] clarified the encoding with memory providers (HeahDude)
This PR was merged into the 3.4 branch. Discussion ---------- [Security] clarified the encoding with memory providers Attempt to fix symfony/symfony#35621. Commits ------- aba29b2 [Security] clarified the encoding with memory providers
2 parents 9525540 + aba29b2 commit bc2970f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

security.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,18 @@ To fix this, add an ``encoders`` key:
449449
User providers load user information and put it into a :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`
450450
implementation. If you :doc:`load users from the database </security/entity_provider>`
451451
or :doc:`some other source </security/custom_provider>`, you'll
452-
use your own custom User class. But when you use the "in memory" provider type,
452+
use your own custom User class. But when you use the ``memory`` provider type,
453453
it gives you a :class:`Symfony\\Component\\Security\\Core\\User\\User` object.
454454

455455
Whatever your User class is, you need to tell Symfony what algorithm was
456456
used to encode the passwords. In this case, the passwords are just plaintext,
457457
but in a second, you'll change this to use ``bcrypt``.
458458

459+
.. caution::
460+
461+
When using a ``memory`` provider and the :class:`Symfony\\Component\\Security\\Core\\User\\User`,
462+
you have to choose an encoding without salt (i.e. ``bcrypt``).
463+
459464
If you refresh now, you'll be logged in! The web debug toolbar even tells
460465
you who you are and what roles you have:
461466

0 commit comments

Comments
 (0)