Skip to content

Commit 7e1f7f6

Browse files
authored
Fix usage of StaticJwtProvider
1 parent d318e07 commit 7e1f7f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mercure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ The following example shows the component in action::
3131
define('HUB_URL', 'https://demo.mercure.rocks/hub');
3232
define('JWT', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJmb28iLCJiYXIiXSwicHVibGlzaCI6WyJmb28iXX19.LRLvirgONK13JgacQ_VbcjySbVhkSmHy3IznH3tA9PM');
3333

34-
use Symfony\Component\Mercure\Jwt\StaticJwtProvide;
34+
use Symfony\Component\Mercure\Jwt\StaticJwtProvider;
3535
use Symfony\Component\Mercure\Publisher;
3636
use Symfony\Component\Mercure\Update;
3737

38-
$publisher = new Publisher(HUB_URL, new StaticJwtProvide(JWT));
38+
$publisher = new Publisher(HUB_URL, new StaticJwtProvider(JWT));
3939
// Serialize the update, and dispatch it to the hub, that will broadcast it to the clients
4040
$id = $publisher(new Update('https://example.com/books/1.jsonld', 'Hi from Symfony!', ['target1', 'target2']));
4141

0 commit comments

Comments
 (0)