2018-11-23 23:06:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
2018-11-26 08:55:06 +00:00
|
|
|
namespace BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers;
|
2018-11-23 23:06:28 +00:00
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
2018-11-24 22:52:55 +00:00
|
|
|
use Illuminate\Contracts\Broadcasting\Broadcaster;
|
2018-11-23 23:06:28 +00:00
|
|
|
|
2018-11-26 00:01:18 +00:00
|
|
|
class AuthenticateDashboard
|
2018-11-23 23:06:28 +00:00
|
|
|
{
|
|
|
|
|
public function __invoke(Request $request, Broadcaster $broadcaster)
|
|
|
|
|
{
|
2018-11-25 21:35:34 +00:00
|
|
|
/*
|
|
|
|
|
* Since the dashboard itself is already secured by the
|
|
|
|
|
* Authorize middleware, we can trust all channel
|
|
|
|
|
* authentication requests in here.
|
|
|
|
|
*/
|
2018-11-23 23:06:28 +00:00
|
|
|
return $broadcaster->validAuthenticationResponse($request, []);
|
|
|
|
|
}
|
2018-12-04 21:22:33 +00:00
|
|
|
}
|