Add client metadata to session creation and enforce TOS/PP
This commit is contained in:
parent
d2119df824
commit
756297671f
10 changed files with 414 additions and 206 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Socialbox\Classes\StandardMethods;
|
||||
|
||||
use Socialbox\Abstracts\Method;
|
||||
use Socialbox\Enums\StandardError;
|
||||
use Socialbox\Interfaces\SerializableInterface;
|
||||
use Socialbox\Objects\ClientRequest;
|
||||
use Socialbox\Objects\RpcRequest;
|
||||
|
@ -15,6 +16,11 @@
|
|||
*/
|
||||
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
||||
{
|
||||
// TODO: Implement execute() method.
|
||||
if($request->getSessionUuid() === null)
|
||||
{
|
||||
return $rpcRequest->produceError(StandardError::SESSION_REQUIRED);
|
||||
}
|
||||
|
||||
return $rpcRequest->produceResponse($request->getSession()->toStandardSessionState());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue