LoginPacketHandler
Extends PacketHandler
Handles the initial login phase of the session. This handler is used as the initial state.
Methods
__construct()
php
public function __construct(\pocketmine\Server $server, \pocketmine\network\mcpe\NetworkSession $session, \Closure $playerInfoConsumer, \Closure $authCallback)handleLogin()
php
public function handleLogin(\pocketmine\network\mcpe\protocol\LoginPacket $packet) : boolmapSelfSignedTokenBody() protected
php
protected function mapSelfSignedTokenBody(array $bodyArray) : \pocketmine\network\mcpe\protocol\types\login\openid\SelfSignedJwtBodymapXboxTokenBody() protected
php
protected function mapXboxTokenBody(array $bodyArray) : \pocketmine\network\mcpe\protocol\types\login\openid\XboxAuthJwtBodymapXboxTokenHeader() protected
php
protected function mapXboxTokenHeader(array $headerArray) : \pocketmine\network\mcpe\protocol\types\login\openid\XboxAuthJwtHeaderparseAuthInfo() protected
php
protected function parseAuthInfo(string $authInfo) : \pocketmine\network\mcpe\protocol\types\login\AuthenticationInfoparseClientData() protected
php
protected function parseClientData(string $clientDataJwt) : \pocketmine\network\mcpe\protocol\types\login\clientdata\ClientDataprocessOpenIdLogin() protected
php
protected function processOpenIdLogin(string $token, string $keyId, string $clientData, bool $authRequired) : voidTODO: This is separated for the purposes of allowing plugins (like Specter) to hack it and bypass authentication. In the future this won't be necessary.
processProxyLogin() 5.46.0 protected
php
protected function processProxyLogin(\pocketmine\network\mcpe\proxy\ProxyTicket $ticket, string $username, string $xuid, \Ramsey\Uuid\UuidInterface $uuid, string $clientDataJwt, bool $authRequired) : voidA session from pm-proxy: the proxy already verified the login (Xbox Live and the client data signature) and signed a ticket for it, so only check that this is the login the ticket was issued for.
processSelfSignedLogin() protected
php
protected function processSelfSignedLogin(string $token, string $clientPublicKey, string $clientData, bool $authRequired) : void