Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 11 additions and 1 deletions
|
@ -3,6 +3,9 @@
|
||||||
namespace Socialbox\Classes\StandardMethods\Core;
|
namespace Socialbox\Classes\StandardMethods\Core;
|
||||||
|
|
||||||
use Socialbox\Abstracts\Method;
|
use Socialbox\Abstracts\Method;
|
||||||
|
use Socialbox\Enums\StandardError;
|
||||||
|
use Socialbox\Exceptions\DatabaseOperationException;
|
||||||
|
use Socialbox\Exceptions\Standard\StandardRpcException;
|
||||||
use Socialbox\Interfaces\SerializableInterface;
|
use Socialbox\Interfaces\SerializableInterface;
|
||||||
use Socialbox\Objects\ClientRequest;
|
use Socialbox\Objects\ClientRequest;
|
||||||
use Socialbox\Objects\RpcRequest;
|
use Socialbox\Objects\RpcRequest;
|
||||||
|
@ -13,7 +16,14 @@
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
return $rpcRequest->produceResponse($request->getSession()->toStandardSessionState());
|
return $rpcRequest->produceResponse($request->getSession()->toStandardSessionState());
|
||||||
}
|
}
|
||||||
|
catch (DatabaseOperationException $e)
|
||||||
|
{
|
||||||
|
throw new StandardRpcException('Failed to retrieve session state due to an internal exception', StandardError::INTERNAL_SERVER_ERROR, $e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue