Add VariableManager, RpcClient classes, and cache enhancements
This commit is contained in:
parent
38092a639e
commit
e55f4d57f9
27 changed files with 606 additions and 56 deletions
|
@ -8,6 +8,7 @@ use Socialbox\Enums\StandardHeaders;
|
|||
use Socialbox\Exceptions\CryptographyException;
|
||||
use Socialbox\Exceptions\DatabaseOperationException;
|
||||
use Socialbox\Exceptions\RpcException;
|
||||
use Socialbox\Exceptions\StandardException;
|
||||
use Socialbox\Managers\SessionManager;
|
||||
use Socialbox\Objects\ClientRequest;
|
||||
use Socialbox\Objects\RpcRequest;
|
||||
|
@ -85,11 +86,6 @@ class RpcHandler
|
|||
|
||||
try
|
||||
{
|
||||
if(!SessionManager::sessionExists($clientRequest->getSessionUuid()))
|
||||
{
|
||||
throw new RpcException('Session UUID not found', 404);
|
||||
}
|
||||
|
||||
$session = SessionManager::getSession($clientRequest->getSessionUuid());
|
||||
|
||||
// Verify the signature of the request
|
||||
|
@ -98,6 +94,10 @@ class RpcHandler
|
|||
throw new RpcException('Request signature check failed', 400);
|
||||
}
|
||||
}
|
||||
catch(StandardException $e)
|
||||
{
|
||||
throw new RpcException($e->getMessage(), 400);
|
||||
}
|
||||
catch(CryptographyException $e)
|
||||
{
|
||||
throw new RpcException('Request signature check failed (Cryptography Error)', 400, $e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue