public function reply()
 {
     if (!self::isAuthenticated()) {
         self::errorUnauthenticated();
     }
     parent::reply();
 }
<?php

require __DIR__ . '/../vendor/autoload.php';
use Datto\JsonRpc\Http\Server;
use Datto\JsonRpc\Http\Examples\Api;
$server = new Server(new Api());
$server->reply();