misc_pterodactyl-panel/app/Http/Requests/Api/Client/WebsocketTokenRequest.php

20 lines
476 B
PHP
Raw Normal View History

2021-08-05 04:36:57 +00:00
<?php
namespace Pterodactyl\Http\Requests\Api\Client;
use Pterodactyl\Models\Permission;
use Illuminate\Auth\Access\AuthorizationException;
2021-08-05 04:36:57 +00:00
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.');
}
2021-08-05 04:36:57 +00:00
}