@@ -112,14 +112,14 @@ This secret key must be stored in the ``MERCURE_JWT_SECRET`` environment variabl
112
112
MercureBundle will use it to automatically generate and sign the needed JWTs.
113
113
114
114
In addition to these environment variables,
115
- MercureBundle provides a more advanced configuration configuration :
115
+ MercureBundle provides a more advanced configuration:
116
116
117
- * ``secret ``: the key to use to sign the JWT (all other options, beside `algorithm `, `subscribe `, and `publish ` will be ignored)
118
- * ``publish ``: a list of topics to allow publishing to when generating the JWT (only usable when `secret `, or `factory ` are provided)
119
- * ``subscribe ``: a list of topics to allow subscribing to when generating the JWT (only usable when `secret `, or `factory ` are provided)
120
- * ``algorithm ``: The algorithm to use to sign the JWT (only usable when `secret ` is provided)
117
+ * ``secret ``: the key to use to sign the JWT (all other options, beside `` algorithm `` , `` subscribe `` , and `` publish ` ` will be ignored)
118
+ * ``publish ``: a list of topics to allow publishing to when generating the JWT (only usable when `` secret `` , or `` factory ` ` are provided)
119
+ * ``subscribe ``: a list of topics to allow subscribing to when generating the JWT (only usable when `` secret `` , or `` factory ` ` are provided)
120
+ * ``algorithm ``: The algorithm to use to sign the JWT (only usable when `` secret ` ` is provided)
121
121
* ``provider ``: The ID of a service to call to provide the JWT (all other options will be ignored)
122
- * ``factory ``: The ID of a service to call to create the JWT (all other options, beside `subscribe `, and `publish ` will be ignored)
122
+ * ``factory ``: The ID of a service to call to create the JWT (all other options, beside `` subscribe `` , and `` publish ` ` will be ignored)
123
123
* ``value ``: the raw JWT to use (all other options will be ignored)
124
124
125
125
.. configuration-block ::
@@ -186,7 +186,7 @@ MercureBundle provides a more advanced configuration configuration:
186
186
187
187
.. tip ::
188
188
189
- The JWT payload must contain at least the following structure to be allowed to
189
+ The JWT payload must contain at least the following structure for the client to be allowed to
190
190
publish:
191
191
192
192
.. code-block :: json
@@ -338,8 +338,8 @@ in a ``Link`` HTTP header.
338
338
339
339
.. image :: /_images/mercure/discovery.png
340
340
341
- You can create ``Link `` headers with the :doc: ` WebLink Component < /web_link >`,
342
- by using the `` AbstractController::addLink `` helper method ::
341
+ You can create ``Link `` headers with the `` Discovery `` helper class
342
+ (under the hood, it uses the :doc: ` WebLink Component < /web_link >`) ::
343
343
344
344
// src/Controller/DiscoverController.php
345
345
namespace App\Controller;
@@ -416,10 +416,10 @@ of the ``Update`` constructor to ``true``::
416
416
}
417
417
418
418
To subscribe to private updates, subscribers must provide to the Hub
419
- a JWT containing a topic selector matching by the update's topic.
419
+ a JWT containing a topic selector matching by the topic of the update .
420
420
421
421
To provide this JWT, the subscriber can use a cookie,
422
- or a ``Authorization `` HTTP header.
422
+ or an ``Authorization `` HTTP header.
423
423
424
424
Cookies can be set automatically by Symfony by passing the appropriate options
425
425
to the ``mercure() `` Twig function. Cookies set by Symfony are automatically
@@ -470,7 +470,7 @@ Programmatically Setting The Cookie
470
470
471
471
Sometimes, it can be convenient to set the authorization cookie from your code
472
472
instead of using the Twig function. MercureBundle provides a convenient service,
473
- :class: ` Symfony \\ Component \\ Mercure \\ Authorization `, to do so.
473
+ `` Authorization ` `, to do so.
474
474
475
475
In the following example controller, the added cookie contains a JWT, itself
476
476
containing the appropriate topic selector.
0 commit comments