Skip to content

Commit 439ecac

Browse files
committed
Minor rewords
1 parent c3b3b7f commit 439ecac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

security/remember_me.rst

+13-13
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The ``remember_me`` firewall defines the following configuration options:
126126

127127
``token_provider`` (default value: ``null``)
128128
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`.
130130

131131
Forcing the User to Opt-Out of the Remember Me Feature
132132
------------------------------------------------------
@@ -258,17 +258,17 @@ your controller using annotations::
258258
For more information on securing services or methods in this way,
259259
see :doc:`/security/securing_services`.
260260

261-
.. _token_in_database:
261+
.. _remember-me-token-in-database:
262262

263263
Storing Remember Me Tokens in the Database
264264
------------------------------------------
265265

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:
272272

273273
.. configuration-block::
274274

@@ -300,8 +300,8 @@ need to register it as a service:
300300
301301
$container->register(DoctrineTokenProvider::class);
302302
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:
305305

306306
.. code-block:: sql
307307
@@ -313,8 +313,8 @@ You need to ensure the following table exists in your database:
313313
`username` varchar(200) NOT NULL
314314
);
315315
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:
318318

319319
.. configuration-block::
320320

@@ -365,7 +365,7 @@ to the service you just created:
365365
// ...
366366
'remember_me' => [
367367
// ...
368-
'token_provider' => '@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider',
368+
'token_provider' => '@Symfony\Bridge\Doctrine\Security\RememberMe\DoctrineTokenProvider',
369369
],
370370
],
371371
],

0 commit comments

Comments
 (0)