diff --git a/Readme.md b/Readme.md index ef1df99..21834c1 100644 --- a/Readme.md +++ b/Readme.md @@ -95,12 +95,18 @@ It has a Laravel Broadcasting driver. That allows events to be broadcast from th **Authorization** -The authorization is done via Laravel Sanctum. For this authorization to be activated, you'll need to install and use the package `kanata-php/laravel-broadcaster`. That package will make available the `conveyor` Broadcast driver. +The authorization is done via Laravel Sanctum. For this authorization to be activated, you'll need to install and use the package `kanata-php/conveyor-laravel-broadcaster`. That package will make available the `conveyor` Broadcast driver. + +A dependency for it in Laravel is the `laravel/sanctum` package. You can install it by running: + +```shell +php artisan install:api +``` To install the package: ```shell -composer install kanata-php/laravel-broadcaster +composer require kanata-php/conveyor-laravel-broadcaster ``` At this moment, it works by using JWT Token API generated for one time consumption. It serves to make sure that the frontend client authorizes before connecting to a protected channel. It uses a query string parameter "token", e.g.: `ws://localhost:8080?token=my-token-here`. diff --git a/composer.json b/composer.json index 3186737..3947f9f 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "guzzlehttp/guzzle": "^7.7", "kanata-php/socket-conveyor": "3.0.1-beta", "textalk/websocket": "^1.5", - "kanata-php/conveyor-laravel-broadcaster": "^0.0", + "kanata-php/conveyor-laravel-broadcaster": "^0.1", "laravel/sanctum": "^3.3|^4.0", "lotharthesavior/hook": "^0.0.1" }, diff --git a/composer.lock b/composer.lock index 1edf93a..aa13345 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d9f42cb5297d0b3e6fca0650413361e4", + "content-hash": "79e52a3107f5cf81f3f10d822842e76f", "packages": [ { "name": "adoy/fastcgi-client",