misc_pterodactyl-panel/app/Http/Requests/Api/Client/WebsocketTokenRequest.php
2021-08-07 16:08:29 -07:00

19 lines
476 B
PHP

<?php
namespace Pterodactyl\Http\Requests\Api\Client;
use Pterodactyl\Models\Permission;
use Illuminate\Auth\Access\AuthorizationException;
class WebsocketTokenRequest extends ClientApiRequest
{
public function permission(): string
{
return Permission::ACTION_WEBSOCKET_CONNECT;
}
protected function failedAuthorization()
{
throw new AuthorizationException('You do not have permission to connect to this server\'s websocket.');
}
}