Skip to content

LoginPacketHandler ​

class · pocketmine\network\mcpe\handler\LoginPacketHandler · source

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) : bool

mapSelfSignedTokenBody() protected ​

php
protected function mapSelfSignedTokenBody(array $bodyArray) : \pocketmine\network\mcpe\protocol\types\login\openid\SelfSignedJwtBody

mapXboxTokenBody() protected ​

php
protected function mapXboxTokenBody(array $bodyArray) : \pocketmine\network\mcpe\protocol\types\login\openid\XboxAuthJwtBody

mapXboxTokenHeader() protected ​

php
protected function mapXboxTokenHeader(array $headerArray) : \pocketmine\network\mcpe\protocol\types\login\openid\XboxAuthJwtHeader

parseAuthInfo() protected ​

php
protected function parseAuthInfo(string $authInfo) : \pocketmine\network\mcpe\protocol\types\login\AuthenticationInfo

parseClientData() protected ​

php
protected function parseClientData(string $clientDataJwt) : \pocketmine\network\mcpe\protocol\types\login\clientdata\ClientData

processOpenIdLogin() protected ​

php
protected function processOpenIdLogin(string $token, string $keyId, string $clientData, bool $authRequired) : void

TODO: 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) : void

A 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

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.