@@ -230,7 +230,8 @@ The value here should correspond with however the passwords were originally
230
230
encoded when creating your users (however those users were created). When
231
231
a user submits her password, the password is appended to the salt value and
232
232
then encoded using this algorithm before being compared to the hashed password
233
- returned by your ``getPassword() `` method.
233
+ returned by your ``getPassword() `` method. Additionally, depending on your
234
+ options, the password may be encoded multiple times and encoded to base64.
234
235
235
236
.. sidebar :: Specifics on how passwords are encoded
236
237
@@ -246,4 +247,19 @@ returned by your ``getPassword()`` method.
246
247
then you'll need to do a bit more work so that Symfony properly encodes
247
248
the password. That is beyond the scope of this entry, but would include
248
249
sub-classing ``MessageDigestPasswordEncoder `` and overriding the ``mergePasswordAndSalt ``
249
- method.
250
+ method.
251
+
252
+ Additionally, the hash, by default, is encoded multiple times and encoded
253
+ to base64. For specific details, see `MessageDigestPasswordEncoder `_.
254
+ To prevent this, configure it in ``security.yml ``:
255
+
256
+ .. code-block :: yaml
257
+
258
+ security :
259
+ encoders :
260
+ Acme\WebserviceUserBundle\Security\User\WebserviceUser :
261
+ algorithm : sha512
262
+ encode_as_base64 : false
263
+ iterations : 1
264
+
265
+ .. _MessageDigestPasswordEncoder : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php
0 commit comments