Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions security/named_encoders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ to apply to all instances of a specific class:
Another option is to use a "named" encoder and then select which encoder
you want to use dynamically.

In the previous example, you've set the ``sha512`` algorithm for ``Acme\UserBundle\Entity\User``.
In the previous example, you've set the ``sha512`` algorithm for ``AppBundle\Entity\User``.
This may be secure enough for a regular user, but what if you want your admins
to have a stronger algorithm, for example ``bcrypt``. This can be done with
named encoders:
Expand Down Expand Up @@ -113,8 +113,8 @@ to use it, the class must implement
The interface requires one method - ``getEncoderName()`` - which should return
the name of the encoder to use::

// src/Acme/UserBundle/Entity/User.php
namespace Acme\UserBundle\Entity;
// src/AppBundle/Entity/User.php
namespace AppBundle\Entity\User;

use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface;
use Symfony\Component\Security\Core\User\UserInterface;
Expand Down