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

Skip to content

[Security] Use AppBundle instead of Acme\UserBundle #14549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2020
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