PocketMine-MP 5.15.1 git-08c6e63aac45a450fe3b437616ee8aa2500e04e2
pocketmine\network\mcpe\JwtUtils Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\JwtUtils:

Static Public Member Functions

static b64UrlDecode (string $str)
 
static b64UrlEncode (string $str)
 
static create (array $header, array $claims, \OpenSSLAsymmetricKey $signingKey)
 
static emitDerPublicKey (\OpenSSLAsymmetricKey $opensslKey)
 
static parse (string $token)
 
static parseDerPublicKey (string $derKey)
 
static split (string $jwt)
 
static verify (string $jwt, \OpenSSLAsymmetricKey $signingKey)
 

Public Attributes

const BEDROCK_SIGNING_KEY_CURVE_NAME = "secp384r1"
 

Detailed Description

Definition at line 60 of file JwtUtils.php.

Member Function Documentation

◆ b64UrlDecode()

static pocketmine\network\mcpe\JwtUtils::b64UrlDecode ( string  $str)
static

Definition at line 215 of file JwtUtils.php.

◆ b64UrlEncode()

static pocketmine\network\mcpe\JwtUtils::b64UrlEncode ( string  $str)
static

Definition at line 211 of file JwtUtils.php.

◆ create()

static pocketmine\network\mcpe\JwtUtils::create ( array  $header,
array  $claims,
\OpenSSLAsymmetricKey  $signingKey 
)
static

@phpstan-param array<string, mixed> $header @phpstan-param array<string, mixed> $claims

Definition at line 195 of file JwtUtils.php.

◆ emitDerPublicKey()

static pocketmine\network\mcpe\JwtUtils::emitDerPublicKey ( \OpenSSLAsymmetricKey  $opensslKey)
static

Definition at line 226 of file JwtUtils.php.

◆ parse()

static pocketmine\network\mcpe\JwtUtils::parse ( string  $token)
static

TODO: replace this result with an object

Returns
mixed[] @phpstan-return array{mixed[], mixed[], string}
Exceptions
JwtException

Definition at line 90 of file JwtUtils.php.

Referenced by pocketmine\network\mcpe\handler\LoginPacketHandler\fetchAuthData().

+ Here is the caller graph for this function:

◆ parseDerPublicKey()

static pocketmine\network\mcpe\JwtUtils::parseDerPublicKey ( string  $derKey)
static

Definition at line 239 of file JwtUtils.php.

◆ split()

static pocketmine\network\mcpe\JwtUtils::split ( string  $jwt)
static
Returns
string[] @phpstan-return array{string, string, string}
Exceptions
JwtException

Definition at line 74 of file JwtUtils.php.

◆ verify()

static pocketmine\network\mcpe\JwtUtils::verify ( string  $jwt,
\OpenSSLAsymmetricKey  $signingKey 
)
static
Exceptions
JwtException

Definition at line 171 of file JwtUtils.php.

Member Data Documentation

◆ BEDROCK_SIGNING_KEY_CURVE_NAME

const pocketmine\network\mcpe\JwtUtils::BEDROCK_SIGNING_KEY_CURVE_NAME = "secp384r1"

Definition at line 61 of file JwtUtils.php.


The documentation for this class was generated from the following file: