@@ -126,7 +126,7 @@ The ``remember_me`` firewall defines the following configuration options:
126
126
127
127
``token_provider `` (default value: ``null ``)
128
128
Defines the service id of a token provider to use. If you want to store tokens
129
- in the database, see :ref: `token_in_database `.
129
+ in the database, see :ref: `remember-me-token-in-database `.
130
130
131
131
Forcing the User to Opt-Out of the Remember Me Feature
132
132
------------------------------------------------------
@@ -258,17 +258,17 @@ your controller using annotations::
258
258
For more information on securing services or methods in this way,
259
259
see :doc: `/security/securing_services `.
260
260
261
- .. _ token_in_database :
261
+ .. _ remember-me-token-in-database :
262
262
263
263
Storing Remember Me Tokens in the Database
264
264
------------------------------------------
265
265
266
- By default, tokens are stored in a cookie. You can choose to store the token in a database,
267
- to not have a (hashed) version of the password in a cookie.
268
- The DoctrineBridge comes with a
269
- : class: ` Symfony \\ Bridge \\ Doctrine\\ Security \\ RememberMe \\ DoctrineTokenProvider ` class
270
- that you can use. In order to use the `` DoctrineTokenProvider ``, you first
271
- need to register it as a service:
266
+ The token contents, including the hashed version of the user password, are
267
+ stored by default in cookies. If you prefer to store them in a database, use the
268
+ :class: ` Symfony \\ Bridge \\ Doctrine \\ Security \\ RememberMe \\ DoctrineTokenProvider `
269
+ class provided by the Doctrine Bridge.
270
+
271
+ First, you need to register `` DoctrineTokenProvider `` as a service:
272
272
273
273
.. configuration-block ::
274
274
@@ -300,8 +300,8 @@ need to register it as a service:
300
300
301
301
$container->register(DoctrineTokenProvider::class);
302
302
303
- The `` DoctrineTokenProvider `` makes use of a database table to store the tokens.
304
- You need to ensure the following table exists in your database :
303
+ Then you need to create a table with the following structure in your database
304
+ so `` DoctrineTokenProvider `` can store the tokens :
305
305
306
306
.. code-block :: sql
307
307
@@ -313,8 +313,8 @@ You need to ensure the following table exists in your database:
313
313
`username` varchar(200) NOT NULL
314
314
);
315
315
316
- Then you need to set the ``token_provider `` option of the ``remember_me `` config
317
- to the service you just created:
316
+ Finally, set the ``token_provider `` option of the ``remember_me `` config to the
317
+ service you just created:
318
318
319
319
.. configuration-block ::
320
320
@@ -365,7 +365,7 @@ to the service you just created:
365
365
// ...
366
366
'remember_me' => [
367
367
// ...
368
- 'token_provider' => '@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider',
368
+ 'token_provider' => '@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider',
369
369
],
370
370
],
371
371
],
0 commit comments