I\'ve written my own password encoder which implements the PasswordEncoderInterface
:
class BCryptPasswordEncoder implements PasswordEncoderInterface
Your encoders
section should look like this:
encoders:
Acme\UserBundle\Entity\User:
id: bcrypt.password.encoder
where Acme\UserBundle
is your vendor and bundle namespace, of course.
For reference, a complete example security config can be found here.
EDIT: The way the encoder factory works (source code here, relevant lines start on line 33) is that in your config, you have given the framework a class, and an encoder to use for the class. It's Doctrine-independent, so just provide the fully-qualified class name of your user object in the config instead of a "user entity," and when your password is encoded, Symfony will know how to handle it.